token update
This commit is contained in:
@@ -37,6 +37,10 @@ const App = () => {
|
||||
};
|
||||
}, []);
|
||||
|
||||
const token = localStorage.getItem('accessToken')
|
||||
console.log(token);
|
||||
|
||||
|
||||
// const PrivateRoute = ({ children }) => {
|
||||
// if (!isAuthenticate && isAuthenticatedInCookie !== "true") {
|
||||
// return <Navigate to="/login" replace />;
|
||||
@@ -52,7 +56,8 @@ const App = () => {
|
||||
path="/*"
|
||||
element={
|
||||
// isOnline ? (
|
||||
isAuthenticate || isAuthenticatedInCookie === "true" ? (
|
||||
// isAuthenticate || isAuthenticatedInCookie === "true" ? (
|
||||
token ? (
|
||||
<DefaultLayout isOnline={isOnline} />
|
||||
) : (
|
||||
<Login />
|
||||
|
||||
Reference in New Issue
Block a user