Skip to content

Commit 848d249

Browse files
Fix ESLint issues: use strict equality and add explicit type annotations
Co-authored-by: kevinjosethomas <46242684+kevinjosethomas@users.noreply.github.com>
1 parent 0bad60a commit 848d249

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/components/Board/GameClock.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export const GameClock: React.FC<Props> = (
1919

2020
const [referenceTime, setReferenceTime] = useState<number>(Date.now())
2121

22-
const playerClock = props.player == 'white' ? whiteClock : blackClock
23-
const active = toPlay == props.player
22+
const playerClock = props.player === 'white' ? whiteClock : blackClock
23+
const active = toPlay === props.player
2424

2525
const clock = Math.max(
2626
active && lastMoveTime > 0
@@ -30,7 +30,7 @@ export const GameClock: React.FC<Props> = (
3030
)
3131

3232
// Convert maiaVersion (e.g., "maia_kdd_1100") to display name (e.g., "Maia 1100")
33-
const getMaiaDisplayName = (version: string) => {
33+
const getMaiaDisplayName = (version: string): string => {
3434
return version.replace('maia_kdd_', 'Maia ')
3535
}
3636

@@ -56,8 +56,8 @@ export const GameClock: React.FC<Props> = (
5656
className={`flex items-center justify-between bg-background-1 md:items-start md:justify-start ${active ? 'opacity-100' : 'opacity-50'} flex-row md:flex-col`}
5757
>
5858
<div className="px-4 py-2">
59-
{props.player == 'black' ? '●' : '○'}{' '}
60-
{player == props.player ? user?.displayName : getMaiaDisplayName(maiaVersion)}
59+
{props.player === 'black' ? '●' : '○'}{' '}
60+
{player === props.player ? user?.displayName : getMaiaDisplayName(maiaVersion)}
6161
</div>
6262
<div className="inline-flex self-start px-4 py-2 md:text-3xl">
6363
{minutes}:{('00' + seconds).slice(-2)}

0 commit comments

Comments
 (0)