From f622bfab54ac40846a41a77f7f60715d2f0535b9 Mon Sep 17 00:00:00 2001 From: Thomas Hallock Date: Sun, 23 Nov 2025 08:33:44 -0600 Subject: [PATCH] fix(know-your-world): fix TypeScript build errors - Fix MapData import in GameInfoPanel.tsx (import from types, not maps) - Fix MapData import in test files - Fix currentRegionName type (handle undefined with ?? null) These errors were blocking the Docker build in CI. --- .../know-your-world/components/GameInfoPanel.test.tsx | 2 +- .../arcade-games/know-your-world/components/GameInfoPanel.tsx | 2 +- .../know-your-world/components/PlayingPhase.test.tsx | 2 +- .../arcade-games/know-your-world/components/PlayingPhase.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web/src/arcade-games/know-your-world/components/GameInfoPanel.test.tsx b/apps/web/src/arcade-games/know-your-world/components/GameInfoPanel.test.tsx index 04eac8a8..2f796fd5 100644 --- a/apps/web/src/arcade-games/know-your-world/components/GameInfoPanel.test.tsx +++ b/apps/web/src/arcade-games/know-your-world/components/GameInfoPanel.test.tsx @@ -2,7 +2,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest' import { render, screen, waitFor } from '@testing-library/react' import userEvent from '@testing-library/user-event' import { GameInfoPanel } from './GameInfoPanel' -import type { MapData } from '../maps' +import type { MapData } from '../types' // Mock the context vi.mock('@/contexts/ThemeContext', () => ({ diff --git a/apps/web/src/arcade-games/know-your-world/components/GameInfoPanel.tsx b/apps/web/src/arcade-games/know-your-world/components/GameInfoPanel.tsx index f2bc1945..1863d6d0 100644 --- a/apps/web/src/arcade-games/know-your-world/components/GameInfoPanel.tsx +++ b/apps/web/src/arcade-games/know-your-world/components/GameInfoPanel.tsx @@ -4,7 +4,7 @@ import { useEffect } from 'react' import { css } from '@styled/css' import { useTheme } from '@/contexts/ThemeContext' import { useKnowYourWorld } from '../Provider' -import type { MapData } from '../maps' +import type { MapData } from '../types' interface GameInfoPanelProps { mapData: MapData diff --git a/apps/web/src/arcade-games/know-your-world/components/PlayingPhase.test.tsx b/apps/web/src/arcade-games/know-your-world/components/PlayingPhase.test.tsx index 95573ab3..34fdb113 100644 --- a/apps/web/src/arcade-games/know-your-world/components/PlayingPhase.test.tsx +++ b/apps/web/src/arcade-games/know-your-world/components/PlayingPhase.test.tsx @@ -1,7 +1,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest' import { render, screen } from '@testing-library/react' import { PlayingPhase } from './PlayingPhase' -import type { MapData } from '../maps' +import type { MapData } from '../types' // Mock dependencies vi.mock('../Provider', () => ({ diff --git a/apps/web/src/arcade-games/know-your-world/components/PlayingPhase.tsx b/apps/web/src/arcade-games/know-your-world/components/PlayingPhase.tsx index c6c75677..196b5476 100644 --- a/apps/web/src/arcade-games/know-your-world/components/PlayingPhase.tsx +++ b/apps/web/src/arcade-games/know-your-world/components/PlayingPhase.tsx @@ -21,7 +21,7 @@ export function PlayingPhase() { // Get the display name for the current prompt const currentRegionName = state.currentPrompt - ? mapData.regions.find((r) => r.id === state.currentPrompt)?.name + ? mapData.regions.find((r) => r.id === state.currentPrompt)?.name ?? null : null // Debug logging