34 lines
897 B
TypeScript
34 lines
897 B
TypeScript
import type { Session, SupabaseClient, User } from '@supabase/supabase-js'
|
|
import type { Database } from './database.types.ts' // import generated types
|
|
|
|
// Define the profile type based on the database schema
|
|
type Profile = {
|
|
display_name: string | null
|
|
section_position: string | null
|
|
section: {
|
|
name: string | null
|
|
} | null
|
|
}
|
|
|
|
declare global {
|
|
namespace App {
|
|
// interface Error {}
|
|
interface Locals {
|
|
supabase: SupabaseClient<Database>
|
|
safeGetSession: () => Promise<{ session: Session | null; user: User | null }>
|
|
getUserProfile: (userId: string) => Promise<Profile | null>
|
|
session: Session | null
|
|
user: User | null
|
|
profile: Profile | null
|
|
}
|
|
interface PageData {
|
|
session: Session | null
|
|
user: User | null
|
|
profile: Profile | null
|
|
}
|
|
// interface PageState {}
|
|
// interface Platform {}
|
|
}
|
|
}
|
|
|
|
export {} |