Skip to content

web


web / lib/auth.svelte / useCurrentUser

Function: useCurrentUser()

useCurrentUser(): object

Defined in: lib/auth.svelte.ts:33

Returns

object

fetchUserSubscription

fetchUserSubscription: (subscriptionId) => Promise<{ cancel_at_period_end: boolean | null; created_at: string | null; current_period_end: string | null; current_period_start: string | null; id: number; plan_id: string | null; seats: number | null; stripe_customer_id: string; stripe_subscription_id: string | null; subscription_status: string | null; updated_at: string | null; user_id: number | null; } | null>

Parameters

subscriptionId

number

Returns

Promise<{ cancel_at_period_end: boolean | null; created_at: string | null; current_period_end: string | null; current_period_start: string | null; id: number; plan_id: string | null; seats: number | null; stripe_customer_id: string; stripe_subscription_id: string | null; subscription_status: string | null; updated_at: string | null; user_id: number | null; } | null>

load

load: () => Promise<void>

Returns

Promise<void>

updateSession

updateSession: (newSession, initialUser?) => Promise<void>

Parameters

newSession

Session | null

initialUser?

User | null

Returns

Promise<void>