- Add error.tsx and loading.tsx boundaries for admin, parent, student, teacher routes - Add dashboard-error-fallback and dashboard-loading-skeleton components - Add student/learning page, parent/leave routes, teacher textbook components - Update existing app routes across auth, dashboard, and API endpoints - Update proxy middleware and next-auth type declarations
25 lines
560 B
TypeScript
25 lines
560 B
TypeScript
import type { DefaultSession } from "next-auth"
|
|
import type { Permission, Role } from "@/shared/types/permissions"
|
|
|
|
declare module "next-auth" {
|
|
interface Session {
|
|
user: DefaultSession["user"] & {
|
|
id: string
|
|
role: string // kept for backward compatibility
|
|
roles: Role[]
|
|
permissions: Permission[]
|
|
onboarded: boolean
|
|
}
|
|
}
|
|
}
|
|
|
|
declare module "next-auth/jwt" {
|
|
interface JWT {
|
|
id: string
|
|
role: string // kept for backward compatibility
|
|
roles: Role[]
|
|
permissions: Permission[]
|
|
onboarded: boolean
|
|
}
|
|
}
|