fix unused variable errors for production build

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
main
name 2026-04-12 00:18:49 -07:00
parent fc74a06f16
commit a295d64da4
4 changed files with 5 additions and 13 deletions

View File

@ -1,5 +1,4 @@
import { playSound, SFX_BUTTON_DEFAULT } from '../../lib/sounds'
import { lighten } from './color-utils'
import type { Song } from './types'
type SongCardProps = {
@ -10,7 +9,7 @@ type SongCardProps = {
onClick: () => void
}
function renderDifficultyDots(difficulty: number, color: string, active: boolean) {
function renderDifficultyDots(difficulty: number) {
return (
<div className="song-card__difficulty" aria-label={`Difficulty ${difficulty} out of 5`}>
{Array.from({ length: 5 }).map((_, index) => {
@ -67,7 +66,7 @@ export function SongCard({ song, trackNumber, offset, isActive, onClick }: SongC
<p className="song-card__artist">{song.artist}</p>
<div className="song-card__bottom-row">
<p className="song-card__bpm">{song.bpm} BPM</p>
{renderDifficultyDots(song.difficulty, song.color, isActive)}
{renderDifficultyDots(song.difficulty)}
</div>
</button>
)

View File

@ -10,7 +10,7 @@ type SongInfoBarProps = {
onConfirm: () => void
}
function DifficultyDots({ difficulty, color }: { difficulty: number; color: string }) {
function DifficultyDots({ difficulty }: { difficulty: number }) {
return (
<div className="song-info-bar__dots" aria-label={`Difficulty ${difficulty} out of 5`}>
{Array.from({ length: 5 }).map((_, index) => (
@ -75,7 +75,7 @@ export function SongInfoBar({ song, onConfirm }: SongInfoBarProps) {
</div>
<div className="song-info-bar__stat">
<DifficultyDots difficulty={song.difficulty} color={song.color} />
<DifficultyDots difficulty={song.difficulty} />
<span className="song-info-bar__label font-caption">DIFF</span>
</div>

View File

@ -19,10 +19,6 @@ const PERFECT_WINDOW = 180
const GOOD_WINDOW = 350
const CLEANUP_DELAY = 600
// Random mode fallback
const RANDOM_SPAWN_INTERVAL = 1800
const RANDOM_DIRECTIONS: ArrowDirection[] = ['left', 'up', 'down', 'right']
const STEP_TO_ARROW: Record<StepDirection, ArrowDirection> = {
left: 'left',
right: 'right',
@ -54,7 +50,7 @@ export const ArrowGame = forwardRef<ArrowGameHandle, Props>(({ active = true, ch
const arrowsRef = useRef<GameArrow[]>([])
const nextId = useRef(0)
const [arrows, setArrows] = useState<GameArrow[]>([])
const [score, setScore] = useState({ perfect: 0, good: 0, miss: 0, combo: 0 })
const [, setScore] = useState({ perfect: 0, good: 0, miss: 0, combo: 0 })
const comboRef = useRef(0)
const [judgment, setJudgment] = useState<{ text: string; key: number; x: number; y: number; rot: number } | null>(null)
const judgmentTimer = useRef<ReturnType<typeof setTimeout> | null>(null)

View File

@ -2,7 +2,6 @@ import { useCallback, useEffect, useRef, useState } from 'react'
import { Navigate, useNavigate } from 'react-router-dom'
import { ROUTE_PATHS } from '../app/route-paths'
import { playSound, SFX_BUTTON_DEFAULT } from '../lib/sounds'
import { SONGS } from '../features/song-select/song-data'
import { useGameStatsStore } from '../stores/game-stats/store'
import { ArrowGame } from '../game/ArrowGame'
import type { ArrowGameHandle } from '../game/ArrowGame'
@ -107,7 +106,6 @@ export function GamePage() {
// Score delta floater + combo
const [scoreDelta, setScoreDelta] = useState<{ value: number; key: number; dx: number; dy: number } | null>(null)
const [scorePulse, setScorePulse] = useState(0)
const [combo, setCombo] = useState(0)
// Scoring: base points + combo bonus (capped at 4x)
@ -134,7 +132,6 @@ export function GamePage() {
dx: 20 + Math.random() * 80,
dy: -10 + Math.random() * 40,
})
setScorePulse(Date.now())
}
},
[addPerfectHit, addGoodHit, addMiss, addScore],