diff --git a/client/components/game/LeaderBoard.tsx b/client/components/game/LeaderBoard.tsx
index b4a93d5..aff0341 100644
--- a/client/components/game/LeaderBoard.tsx
+++ b/client/components/game/LeaderBoard.tsx
@@ -92,18 +92,33 @@ export default function LeaderBoard(props: LeaderBoardProps) {
setGameDockExpand(!gameDockExpand);
}}
>
- {warringStatesMode && (
- {t('country')}
- )}
- {gameDockExpand && checkedPlayers && setCheckedPlayers && (
- {t('view')}
- )}
- {gameDockExpand ? (
- {t('player')}
- ) : (
-
- )}
-
+
+ {t('country')}
+
+
+ {t('view')}
+
+
+ {t('player')}
+
+
{t('army')}
{t('land')}
@@ -116,57 +131,60 @@ export default function LeaderBoard(props: LeaderBoardProps) {
{WarringStates[player.color]}
)}
- {gameDockExpand && checkedPlayers && setCheckedPlayers && (
-
- {
- if (event.target.checked) {
- let newCheckedPlayers = [
- ...checkedPlayers,
- {
- username: player.username,
- color: player.color,
- } as UserData,
- ];
- setCheckedPlayers(newCheckedPlayers);
- } else {
- setCheckedPlayers(
- checkedPlayers.filter(
- (p) => p.color !== player.color
- )
- );
- }
- }}
- />
-
- )}
- {gameDockExpand ? (
- {
- setGameDockExpand(!gameDockExpand);
- }}
- >
- {player.username}
-
- ) : (
-
+ {
- setGameDockExpand(!gameDockExpand);
+ onChange={(event: any) => {
+ if (!checkedPlayers || !setCheckedPlayers) return;
+ if (event.target.checked) {
+ let newCheckedPlayers = [
+ ...(checkedPlayers as UserData[]),
+ {
+ username: player.username,
+ color: player.color,
+ } as UserData,
+ ];
+ setCheckedPlayers(newCheckedPlayers);
+ } else {
+ setCheckedPlayers(
+ checkedPlayers.filter((p) => p.color !== player.color)
+ );
+ }
}}
- >
- )}
+ />
+
+ {
+ setGameDockExpand(!gameDockExpand);
+ }}
+ >
+ {player.username}
+
+ {
+ setGameDockExpand(!gameDockExpand);
+ }}
+ >
{