Commit 3530e238 by Arjun Jhukal

updated the new changes for the sitemap redirection issue

parent 7565fb31
......@@ -31,7 +31,7 @@ export default function Private({ children }: { children: React.ReactNode }) {
if (!accessToken || isTokenExpired(accessToken)) {
dispatch(clearTokens());
router.replace("/");
// router.replace("/");
return;
}
......
......@@ -17,7 +17,7 @@ export default async function ServerPrivate({ children }: { children: React.Reac
const cookieStore = await cookies();
const access_token = cookieStore.get("access_token")?.value;
if (!access_token) redirect("/");
if (!access_token) return;
const payload = decodeJwt(access_token);
if (!payload || !payload.exp || payload.exp < Math.floor(Date.now() / 1000)) {
......
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