SPB Git

spb/rareindex

Public
357 B · 9 lines tsx
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
Files · 928c8dfd3710b817fe8e1e510fc295f59b7ddb9b
Menu

Theme