|
@@ -4,10 +4,9 @@ import { joinGame, sendGuess, getCurrentRound } from "./apiMethods";
|
|
|
import {
|
|
|
saveGameInfoToLocalStorage,
|
|
|
clearGameInfoFromLocalStorage,
|
|
|
- getGameInfoFromLocalStorage,
|
|
|
saveTimerToLocalStorage,
|
|
|
clearRoundInfoFromLocalStorage,
|
|
|
- getRoundInfoFromLocalStorage,
|
|
|
+ getInfoFromLocalStorage,
|
|
|
} from "./localStorageMethods";
|
|
|
|
|
|
export const [
|
|
@@ -72,10 +71,9 @@ export const [
|
|
|
saveGameInfoToLocalStorage(gameId, name, playerId);
|
|
|
},
|
|
|
rejoinGame: async ([set, get]) => {
|
|
|
- const { gameId, playerName, playerId } = getGameInfoFromLocalStorage();
|
|
|
+ const { gameId, playerName, playerId, timer, position, pov } = getInfoFromLocalStorage();
|
|
|
set({ gameId, playerName, playerId });
|
|
|
await dispatch.updateCurrentRound();
|
|
|
- const { timer, position, pov } = getRoundInfoFromLocalStorage();
|
|
|
set({
|
|
|
roundSeconds: timer ?? get.roundSeconds(),
|
|
|
panoStartPosition: position ?? get.panoStartPosition(),
|