소스 검색

Simple change to show total score in all the guess markers

Kirk Trombley 5 년 전
부모
커밋
102428979e
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      client/src/components/screens/RoundSummary/useMarkersFromGuesses.jsx

+ 2 - 2
client/src/components/screens/RoundSummary/useMarkersFromGuesses.jsx

@@ -34,11 +34,11 @@ export default (mapRef, roundNum, targetPoint) => {
   useEffect(() => {
     if (!players) return;
     const drawings = [];
-    players.forEach(({ name, guess: { lat, lng, score } }) => {
+    players.forEach(({ name, totalScore, guess: { lat, lng, score } }) => {
       const color = playerColors.current[name];
       const selectedPoint = { lat, lng };
 
-      const marker = makeQuestionMarker(mapRef.current, selectedPoint, `${name} - ${score} Points`, color);
+      const marker = makeQuestionMarker(mapRef.current, selectedPoint, `${name}\n${score} Points\n${totalScore} Total`, color);
       drawings.push(marker);
 
       const line = makeLine(selectedPoint, targetPoint, mapRef.current, color);