diff --git a/src/PrivateRoute.js b/src/PrivateRoute.js index f89108e..8285b3a 100644 --- a/src/PrivateRoute.js +++ b/src/PrivateRoute.js @@ -1,15 +1,15 @@ import React from "react"; import { Redirect, Route } from "react-router-dom"; -import { isLogin } from "./utils/auth"; - export const PrivateRoute = ({ component: Component, ...rest }) => { return ( - isLogin() ? : - } + render={props => ( + localStorage.getItem('user') + ? + : + )} /> ); };