Primitive

useSession

Session hook. STUB in S1 (returns status: "stub"). Replaced by real admin-auth integration in S2.

Preview

{
  "user": null,
  "status": "loading"
}

Import

ts
import { useSession } from '@gautham/design-system/auth'

Usage

tsx
const { user, status } = useSession()
if (status === 'loading') return <Spinner />
if (status === 'unauthenticated') return <SignInPrompt />
return <AdminLayout user={user!}>…</AdminLayout>

When not to use

Use the stub for scaffolding but do not ship a protected page against it — it always returns null. Session 2 wires this up to admin-auth.gauthamvijay.com.