feat: Integrate join URL and QR code for player access

Adds a dynamic join URL and QR code displayed on the spectator view and host dashboard. This allows players to easily join the quiz session by scanning the QR code or navigating to the provided URL.

The `joinUrl` is now managed within the `GameContext` and exposed to relevant components. The spectator view uses this URL to generate the QR code, while the host view displays it for easy access. This enhances the onboarding experience for new players and simplifies session management.
This commit is contained in:
Philip
2026-01-28 19:01:34 -08:00
parent 1939574e0f
commit c5cf88491f
7 changed files with 403 additions and 105 deletions
+9 -1
View File
@@ -1,3 +1,4 @@
export const GamePhase = {
LOBBY: 'LOBBY',
COUNTDOWN: 'COUNTDOWN',
@@ -66,4 +67,11 @@ export interface GameState {
currentQuestionIndex: number;
countdownValue: number;
buzzerOpenTimestamp: number | null; // To calculate reaction time
}
}
// Synchronization Types
export interface PlayerIntent {
type: 'JOIN' | 'BUZZ' | 'LEAVE';
payload: any;
created_at?: string;
}