diff --git a/app/page.tsx b/app/page.tsx index 0836a47..e13e2d6 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -73,10 +73,8 @@ export default async function Page(props: { }) { const cookieStore = await cookies(); const pagePref = cookieStore.get("pagePref"); - if (pagePref && pagePref.value != "plan") { - console.log("wtf"); - console.log(pagePref.value); - redirect("/" + pagePref.value); + if (pagePref && pagePref.value != "/") { + redirect(pagePref.value); } const searchParams = await props.searchParams; diff --git a/components/navbar.tsx b/components/navbar.tsx index e86dacb..8728d9e 100644 --- a/components/navbar.tsx +++ b/components/navbar.tsx @@ -96,7 +96,7 @@ export const Navbar = (props: any) => { variant: pathname === item.href ? "shadow" : "ghost", })} onClick={() => { - cookies.set("pagePref", item.label.toLowerCase()); + cookies.set("pagePref", item.href); }} href={item.href} > @@ -163,7 +163,7 @@ export const Navbar = (props: any) => { href={item.href} size="lg" onClick={() => { - cookies.set("pagePref", item.label.toLowerCase()); + cookies.set("pagePref", item.href); }} > {item.label}