mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
* lw13 interactive realtime grid * 3d metal ticket * add dynamic text to ticket * reset ticket tilt on mouseout * improve canvas sizing and ticket positioning and originate tilt from ticket * test lw layout * test lw layout * fix imports * . * fix .length bug * usual ticketing flow * reduce ticket padding * reduce fade delay * add name from db * text size * use multiplayer.dev cursor logic * lodash samplesize * good state * working users cursors * single partyMode off * clean up * refactor ticket layout and positioning logic * regular and platinum tickets * regular theme based og * add mono font to ticket, finish textures and ogs * ticket cleanup * restore countdown with ticket * update og * update og * remote year add hour * drag ticket to flip * remove * add presence * remove cursor on own touch device * test hidden mobile cursor * fix mobile dragging * scale ticket on interaction * code logic * secret ticket logic * cleanup * persist won game * enable game on mobile * fix mobile game * add announcement banners * update text layout * hide game from share page and if game won * fix mobile flip 🎉 * fix meetups time formatting * faster flip * tiger init styling (#30649) * update * mobile fix --------- Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com> * use multilanguage font * lineheight * only published meetups * comment on timezone column * better mobile input positioning * fix sudden lighting change * increase cell size for better performance * increase cell size for better performance * last touches --------- Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
54 lines
1.3 KiB
TypeScript
54 lines
1.3 KiB
TypeScript
import { Session, SupabaseClient } from '@supabase/supabase-js'
|
|
import { createContext, useContext } from 'react'
|
|
|
|
export type TicketState = 'registration' | 'ticket' | 'loading' | 'game'
|
|
|
|
export type UserData = {
|
|
id?: string
|
|
email?: string
|
|
username?: string
|
|
name?: string
|
|
ticket_number?: number
|
|
platinum?: boolean
|
|
golden?: boolean
|
|
referrals?: number
|
|
bg_image_id?: number
|
|
role?: string
|
|
company?: string
|
|
location?: string
|
|
metadata?: {
|
|
role?: string
|
|
company?: string
|
|
location?: string
|
|
hasSecretTicket?: boolean
|
|
hasSharedSecret?: boolean
|
|
hideAvatar?: boolean
|
|
hideMetadata?: boolean
|
|
theme?: string
|
|
}
|
|
shared_on_twitter?: string
|
|
shared_on_linkedin?: string
|
|
secret?: boolean
|
|
}
|
|
|
|
type ConfDataContextType = {
|
|
supabase: SupabaseClient | null
|
|
session: Session | null
|
|
userData: UserData
|
|
setUserData: React.Dispatch<React.SetStateAction<UserData>>
|
|
ticketState: TicketState
|
|
setTicketState: React.Dispatch<React.SetStateAction<TicketState>>
|
|
showCustomizationForm?: boolean
|
|
setShowCustomizationForm?: React.Dispatch<React.SetStateAction<boolean>>
|
|
}
|
|
|
|
export const ConfDataContext = createContext<ConfDataContextType | null>(null)
|
|
|
|
export default function useConfData() {
|
|
const result = useContext(ConfDataContext)
|
|
if (!result) {
|
|
throw new Error()
|
|
}
|
|
return result
|
|
}
|