To make it possible to render the timetable in the user's local time we need to know the timezone to render it in on the server. Otherwise there will be hydration errors and paint flashing as the client renders a different timezone. Add a server global default timezone that can be overriden on a per-account bases to prepare for timezone handling the timetable.
25 lines
466 B
TypeScript
25 lines
466 B
TypeScript
export interface Account {
|
|
id: number,
|
|
type: "anonymous" | "regular" | "crew" | "admin",
|
|
/** Name of the account. Not present on anonymous accounts */
|
|
name?: string,
|
|
interestedIds?: string[],
|
|
timezone?: string,
|
|
}
|
|
|
|
export interface Subscription {
|
|
type: "push",
|
|
sessionId: number,
|
|
push: PushSubscriptionJSON,
|
|
}
|
|
|
|
export interface Session {
|
|
id: number,
|
|
accountId: number,
|
|
}
|
|
|
|
export interface AccountSession {
|
|
id: number,
|
|
account: Account,
|
|
push: boolean,
|
|
}
|