Commit 926a155a by Arjun Jhukal

resolved the redirection issue from sitemap url

parent 3530e238
......@@ -40,9 +40,9 @@ export default function Private({ children }: { children: React.ReactNode }) {
dispatch(setTokens({ access_token: accessToken, user: user || null }));
}
if (!user) {
router.replace("/");
}
// if (!user) {
// router.replace("/");
// }
}, [token, user, dispatch, router]);
if (!user) return null;
......
......@@ -19,10 +19,10 @@ export default async function ServerPrivate({ children }: { children: React.Reac
if (!access_token) return;
const payload = decodeJwt(access_token);
if (!payload || !payload.exp || payload.exp < Math.floor(Date.now() / 1000)) {
redirect("/");
}
// const payload = decodeJwt(access_token);
// if (!payload || !payload.exp || payload.exp < Math.floor(Date.now() / 1000)) {
// redirect("/");
// }
// const user = payload;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment