fix: Use type for type imports and literal types

Refactor `types.ts` to use `as const` for `GamePhase` and explicitly define the `GamePhase` type. This improves type safety and clarity. Additionally, update imports in other files to use `type` for type-only imports, further enhancing type safety and preventing potential runtime issues.
This commit is contained in:
Philip
2026-01-28 18:07:31 -08:00
parent ee4f3766cd
commit 77cc74a7c3
6 changed files with 30 additions and 22 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
import React, { createContext, useContext, useState, useEffect, useCallback } from 'react';
import { GamePhase, Player, Team, Question, BuzzerLog, GameState, Game } from '../types';
import React, { createContext, useContext, useState, useEffect } from 'react';
import { GamePhase } from '../types';
import type { Player, Team, Question, BuzzerLog, GameState, Game } from '../types';
interface GameContextType {
// State