fix: pass missing poll state setters to SessionInfo WebSocket handler
setPollEndingAt and setShowEndPollOptions were referenced in SessionInfo's WS handler but never passed as props, causing a ReferenceError that prevented setPollResult from executing on delayed poll ends. Bumps version to 0.7.12. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,7 +2,7 @@ export const branding = {
|
|||||||
app: {
|
app: {
|
||||||
name: 'HSO Jackbox Game Picker',
|
name: 'HSO Jackbox Game Picker',
|
||||||
shortName: 'Jackbox Game Picker',
|
shortName: 'Jackbox Game Picker',
|
||||||
version: '0.7.11 - Pokémon-Go-To-The-Polls Edition',
|
version: '0.7.12 - Pokémon-Go-To-The-Polls Edition',
|
||||||
description: 'Spicing up Hyper Spaceout game nights!',
|
description: 'Spicing up Hyper Spaceout game nights!',
|
||||||
},
|
},
|
||||||
meta: {
|
meta: {
|
||||||
|
|||||||
@@ -1289,6 +1289,8 @@ function Picker() {
|
|||||||
setPollActive={setPollActive}
|
setPollActive={setPollActive}
|
||||||
pollActiveRef={pollActiveRef}
|
pollActiveRef={pollActiveRef}
|
||||||
setPollResult={setPollResult}
|
setPollResult={setPollResult}
|
||||||
|
setPollEndingAt={setPollEndingAt}
|
||||||
|
setShowEndPollOptions={setShowEndPollOptions}
|
||||||
pollStartedAtRef={pollStartedAtRef}
|
pollStartedAtRef={pollStartedAtRef}
|
||||||
setSelectedGame={setSelectedGame}
|
setSelectedGame={setSelectedGame}
|
||||||
setGameSource={setGameSource}
|
setGameSource={setGameSource}
|
||||||
@@ -1299,7 +1301,7 @@ function Picker() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function SessionInfo({ sessionId, onGamesUpdate, playingGame, setPlayingGame, setHasPlayedGames, setLeadingGame, setPollActive, pollActiveRef, setPollResult, pollStartedAtRef, setSelectedGame, setGameSource }) {
|
function SessionInfo({ sessionId, onGamesUpdate, playingGame, setPlayingGame, setHasPlayedGames, setLeadingGame, setPollActive, pollActiveRef, setPollResult, setPollEndingAt, setShowEndPollOptions, pollStartedAtRef, setSelectedGame, setGameSource }) {
|
||||||
const { isAuthenticated, token } = useAuth();
|
const { isAuthenticated, token } = useAuth();
|
||||||
const [games, setGames] = useState([]);
|
const [games, setGames] = useState([]);
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
@@ -1493,7 +1495,7 @@ function SessionInfo({ sessionId, onGamesUpdate, playingGame, setPlayingGame, se
|
|||||||
console.error('[WebSocket] Failed to connect:', error);
|
console.error('[WebSocket] Failed to connect:', error);
|
||||||
reconnectTimeoutRef.current = setTimeout(connectWs, 3000);
|
reconnectTimeoutRef.current = setTimeout(connectWs, 3000);
|
||||||
}
|
}
|
||||||
}, [sessionId, token, loadGames, setPollActive, setPollResult, setLeadingGame, pollActiveRef, pollStartedAtRef, setSelectedGame, setGameSource]);
|
}, [sessionId, token, loadGames, setPollActive, setPollResult, setPollEndingAt, setShowEndPollOptions, setLeadingGame, pollActiveRef, pollStartedAtRef, setSelectedGame, setGameSource]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
connectWs();
|
connectWs();
|
||||||
|
|||||||
Reference in New Issue
Block a user