Przeglądaj źródła

Hotfix to disable the point and timer reloading on a rejoin

Kirk Trombley 5 lat temu
rodzic
commit
12e62e31a9

+ 2 - 6
client/src/components/screens/GamePanel/GamePanel.jsx

@@ -5,7 +5,6 @@ import GuessPane from "./GuessPane";
 import PositionedStreetView from "./PositionedStreetView";
 import useRoundInfo from "../../../hooks/useRoundInfo";
 import { dispatch } from '../../../domain/gameStore';
-import { useTimerFromLocalStorage, usePointFromLocalStorage } from '../../../domain/localStorageMethods';
 import usePreventNavigation from '../../../hooks/usePreventNavigation';
 
 const Container = styled.div`
@@ -49,9 +48,6 @@ export default () => {
     return <Loading/>
   }
 
-  const storedTimer = useTimerFromLocalStorage();
-  const storedPoint = usePointFromLocalStorage();
-
   const handleSubmitGuess = async () => {
     setSubmitDisabled(true);
     await dispatch.submitGuess(selectedPoint, currentRound, targetPoint);
@@ -60,10 +56,10 @@ export default () => {
   return (
     <Container>
       <StreetViewWrapper>
-        <PositionedStreetView position={storedPoint ?? targetPoint} resetPosition={targetPoint} />
+        <PositionedStreetView position={targetPoint} />
       </StreetViewWrapper>
       <GuessPane
-        roundSeconds={storedTimer ?? roundSeconds}
+        roundSeconds={roundSeconds}
         onTimeout={handleSubmitGuess}
         onSelectPoint={setSelectedPoint}
         onSubmitGuess={handleSubmitGuess}