|
@@ -6,6 +6,7 @@ import PositionedStreetView from "./PositionedStreetView";
|
|
|
import useRoundInfo from "../../../hooks/useRoundInfo";
|
|
|
import { dispatch } from '../../../domain/gameStore';
|
|
|
import { useTimerFromLocalStorage, clearTimerFromLocalStorage } from '../../../domain/localStorageMethods';
|
|
|
+import usePreventNavigation from '../../../hooks/usePreventNavigation';
|
|
|
|
|
|
const Container = styled.div`
|
|
|
height: 100%;
|
|
@@ -31,6 +32,9 @@ const StreetViewWrapper = styled.div`
|
|
|
`
|
|
|
|
|
|
export default () => {
|
|
|
+ // warn the user if they navigate away
|
|
|
+ usePreventNavigation();
|
|
|
+
|
|
|
const [submitDisabled, setSubmitDisabled] = useState(false);
|
|
|
const [selectedPoint, setSelectedPoint] = useState(null);
|
|
|
const [finished, roundInfo] = useRoundInfo();
|