save local copy

This commit is contained in:
Jun-te Kim 2025-12-31 01:22:23 +00:00
parent 885bba59ec
commit 07c9e88a86

View file

@ -7,7 +7,18 @@
//
// 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 (
<main className="max-w-2xl mx-auto p-8 space-y-10">
@ -58,5 +69,5 @@ export default function Home() {
</section>
</main>
)
);
}