save local copy
This commit is contained in:
parent
885bba59ec
commit
07c9e88a86
1 changed files with 13 additions and 2 deletions
|
|
@ -7,7 +7,18 @@
|
||||||
//
|
//
|
||||||
// Everything else lives elsewhere.
|
// Everything else lives elsewhere.
|
||||||
|
|
||||||
export default function Home() {
|
import { cookies } from "next/headers";
|
||||||
|
import { redirect } from "next/navigation";
|
||||||
|
|
||||||
|
export default async function Home() {
|
||||||
|
const cookieStore = await cookies();
|
||||||
|
const session = cookieStore.get("session");
|
||||||
|
|
||||||
|
// ✅ If already logged in, go straight to app
|
||||||
|
if (session) {
|
||||||
|
redirect("/app");
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<main className="max-w-2xl mx-auto p-8 space-y-10">
|
<main className="max-w-2xl mx-auto p-8 space-y-10">
|
||||||
|
|
||||||
|
|
@ -58,5 +69,5 @@ export default function Home() {
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue