token update

This commit is contained in:
2024-08-07 20:24:38 +05:30
parent e234ce3181
commit 591e0c92a0

View File

@@ -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 />