|
@@ -83,7 +83,6 @@ export const [
|
|
|
roundNum,
|
|
|
selectedPoint || { timeout: true }
|
|
|
);
|
|
|
- const { currentRound, coord, timer } = await getCurrentRound(gameId, playerId);
|
|
|
set({
|
|
|
lastRound: {
|
|
|
roundNum,
|
|
@@ -91,19 +90,20 @@ export const [
|
|
|
score,
|
|
|
totalScore,
|
|
|
},
|
|
|
+ gameState: POST_ROUND,
|
|
|
+ });
|
|
|
+ const { currentRound, coord, timer } = await getCurrentRound(gameId, playerId);
|
|
|
+ set({
|
|
|
currentRound,
|
|
|
targetPoint: coord,
|
|
|
roundSeconds: timer,
|
|
|
- gameState: POST_ROUND,
|
|
|
});
|
|
|
- clearTimerFromLocalStorage();
|
|
|
- clearPointFromLocalStorage();
|
|
|
},
|
|
|
- goToSummary: ([set, get], gameId, clearSavedGame = true) => {
|
|
|
- set({
|
|
|
- gameId: gameId || get.gameId(),
|
|
|
- gameState: POST_GAME,
|
|
|
- });
|
|
|
+ goToSummary: ([set], gameId, clearSavedGame = true) => {
|
|
|
+ if (gameId) {
|
|
|
+ set({ gameId });
|
|
|
+ }
|
|
|
+ set({ gameState: POST_GAME });
|
|
|
if (clearSavedGame) {
|
|
|
clearTimerFromLocalStorage();
|
|
|
clearPointFromLocalStorage();
|