SPB Git forge

spb/rareindex

Public
54commits 1branches 0releases
7.1 MBsize
maindefault branch
10 days agolast push
TypeScript 61.9% HTML 37.2% SQL 0.7%
357 B · 9 lines tsx
Raw Blame History
1import { redirect } from 'next/navigation';2import { getCurrentUser } from '@/lib/auth/session';34/** /account is the header's "Sign in" target: route to settings when signed in, else to login. */5export default async function AccountIndex() {6  const u = await getCurrentUser();7  redirect(u ? '/account/settings' : '/login?next=%2Faccount%2Fsettings');8}9