|
@@ -122,7 +122,7 @@ const playerColors = {};
|
|
|
|
|
|
export default () => {
|
|
|
// get the info about the last round
|
|
|
- const { roundNum, targetPoint, score, totalScore } = useLastRound();
|
|
|
+ const { roundNum, targetPoint } = useLastRound();
|
|
|
|
|
|
// draw the map
|
|
|
// TODO dynamically determine this zoom level?
|
|
@@ -140,7 +140,7 @@ export default () => {
|
|
|
|
|
|
// live update the player scores
|
|
|
const players = usePlayerScores()
|
|
|
- ?.filter(({ guesses }) => guesses[roundNum] && guesses[roundNum].score);
|
|
|
+ ?.filter(({ guesses }) => guesses[roundNum] && guesses[roundNum].score !== null);
|
|
|
useEffect(() => {
|
|
|
if (!players) return;
|
|
|
const drawings = [];
|
|
@@ -165,6 +165,10 @@ export default () => {
|
|
|
|
|
|
// whether or not the game is done
|
|
|
const [gameFinished] = useRoundInfo()
|
|
|
+
|
|
|
+ const playerInfo = players?.find(({ name }) => name === playerName);
|
|
|
+ const score = playerInfo?.guesses?.[roundNum]?.score ?? 0;
|
|
|
+ const totalScore = playerInfo?.totalScore ?? 0;
|
|
|
|
|
|
return (
|
|
|
<Container>
|