|
@@ -26,7 +26,6 @@ const GuessPane = () => {
|
|
|
const [selectedPoint, setSelectedPoint] = useState(null);
|
|
|
const [submitted, setSubmitted] = useState(false);
|
|
|
const [mapSize, setMapSize] = useState("small");
|
|
|
- const [potentialScore, setPotentialScore] = useState(null);
|
|
|
const [gunGameBlock, setGunGameBlock] = useState(false);
|
|
|
const unblock = useCallback(() => setGunGameBlock(false), []);
|
|
|
const toggleBig = useCallback(() => setMapSize(toggleMapSize("big")), []);
|
|
@@ -51,7 +50,6 @@ const GuessPane = () => {
|
|
|
roundNum
|
|
|
);
|
|
|
if (score < 4000) {
|
|
|
- setPotentialScore(score);
|
|
|
setGunGameBlock(true);
|
|
|
} else {
|
|
|
await handleSubmitGuess();
|
|
@@ -60,9 +58,7 @@ const GuessPane = () => {
|
|
|
|
|
|
return (
|
|
|
<>
|
|
|
- {gunGameBlock && gameMode === GUN_GAME && (
|
|
|
- <GunGame points={potentialScore} onFinish={unblock} />
|
|
|
- )}
|
|
|
+ {gunGameBlock && gameMode === GUN_GAME && <GunGame onFinish={unblock} />}
|
|
|
<div className={`${styles.pane} ${mapSizeOpts[mapSize]}`}>
|
|
|
<button
|
|
|
type="button"
|