diff --git a/knip.jsonc b/knip.jsonc index cf1229bd9..afa6c413c 100644 --- a/knip.jsonc +++ b/knip.jsonc @@ -50,7 +50,6 @@ "src/components/application-starter/TemplatePicker.tsx", "src/components/application-starter/index.ts", "src/components/game/engine/entities/index.ts", - "src/components/game/ui/DiscoveryProgress.tsx", "src/components/icons/BaseballCapIcon.tsx", "src/components/icons/YinYangIcon.tsx", "src/components/landing/HotkeysShortcut.client.tsx", diff --git a/src/components/game/ui/DiscoveryProgress.tsx b/src/components/game/ui/DiscoveryProgress.tsx deleted file mode 100644 index a9de7f1ce..000000000 --- a/src/components/game/ui/DiscoveryProgress.tsx +++ /dev/null @@ -1,116 +0,0 @@ -import { useEffect, useState } from 'react' -import { useGameStore } from '../hooks/useGameStore' -import { getLibraryColor } from '../utils/colors' - -const SIZE = 50 -const STROKE_WIDTH = 5 -const RADIUS = (SIZE - STROKE_WIDTH) / 2 -const CIRCUMFERENCE = 2 * Math.PI * RADIUS - -export function DiscoveryProgress() { - const { phase, nearbyIsland, discoveredIslands } = useGameStore() - const [progress, setProgress] = useState(0) - const [isVisible, setIsVisible] = useState(false) - - useEffect(() => { - if (phase !== 'playing') return - - const interval = setInterval(() => { - const { discoveryProgress, nearbyIsland, discoveredIslands } = - useGameStore.getState() - - // Only show for undiscovered islands - const shouldShow = - nearbyIsland && - !discoveredIslands.has(nearbyIsland.id) && - discoveryProgress > 0 - - setIsVisible(!!shouldShow) - setProgress(discoveryProgress) - }, 50) - - return () => clearInterval(interval) - }, [phase]) - - if (phase !== 'playing') return null - if (!isVisible || !nearbyIsland) return null - - // Already discovered - if (discoveredIslands.has(nearbyIsland.id)) return null - - const strokeDashoffset = CIRCUMFERENCE * (1 - progress) - const color = - nearbyIsland.type === 'library' && nearbyIsland.library - ? getLibraryColor(nearbyIsland.library.id) - : nearbyIsland.type === 'partner' - ? '#f59e0b' // Amber for partners - : '#8b5cf6' // Purple for showcase - - const name = - nearbyIsland.type === 'library' && nearbyIsland.library - ? nearbyIsland.library.name - : nearbyIsland.type === 'partner' && nearbyIsland.partner - ? nearbyIsland.partner.name - : 'Unknown' - - return ( -