import { redirect } from 'next/navigation'; import { getCurrentUser } from '@/lib/auth/session'; /** /account is the header's "Sign in" target: route to settings when signed in, else to login. */ export default async function AccountIndex() { const u = await getCurrentUser(); redirect(u ? '/account/settings' : '/login?next=%2Faccount%2Fsettings'); }