makearmy-app/app/portal/account/page.tsx
2025-09-30 13:02:57 -04:00

16 lines
572 B
TypeScript

// app/portal/account/page.tsx
import { cookies } from "next/headers";
import { redirect } from "next/navigation";
import AccountPanel from "./AccountPanel";
export const dynamic = "force-dynamic";
export default async function AccountPage() {
const at = (await cookies()).get("ma_at")?.value;
if (!at) {
redirect(`/auth/sign-in?next=${encodeURIComponent("/portal/account")}`);
}
// No reauth gating here; the panel will fetch and render profile,
// and only ask for reauth when user submits sensitive changes.
return <AccountPanel />;
}