diff --git a/tank-frontend/src/PlayerInfo.tsx b/tank-frontend/src/PlayerInfo.tsx index a14cb3d..348503e 100644 --- a/tank-frontend/src/PlayerInfo.tsx +++ b/tank-frontend/src/PlayerInfo.tsx @@ -3,6 +3,16 @@ import {Player} from './serverCalls'; import {Guid} from "./Guid.ts"; import Column from "./components/Column.tsx"; +function ScoreRow({name, value}: { + name: string; + value?: any; +}) { + return + {name} + {value ?? '?'} + ; +} + export default function PlayerInfo({playerId}: { playerId: Guid }) { const query = useQuery({ queryKey: ['player'], @@ -26,14 +36,9 @@ export default function PlayerInfo({playerId}: { playerId: Guid }) { {query.isError &&

{query.error.message}

} {query.isSuccess && - - - - - - - - + + +
kills:{query.data?.scores?.kills ?? '?'}
deaths:{query.data?.scores?.deaths ?? '?'}
} ;