Skip to content

Commit

Permalink
Update ExperimentalGameStateHandler.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
LaustinSpayce committed May 16, 2023
1 parent bed4318 commit efcff08
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/app/ExperimentalGameStateHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ const ExperimentalGameStateHandler = () => {
if (parseInt(gameID ?? '') > GAME_LIMIT_LIVE) {
baseUrl = API_URL_LIVE;
}
if (parseInt(gameID ?? '') === 0) {
baseUrl = import.meta.env.DEV ? API_URL_DEV : API_URL_LIVE;
}

useEffect(() => {
dispatch(
Expand All @@ -41,9 +38,9 @@ const ExperimentalGameStateHandler = () => {
authKey: gameInfo.authKey || authKey
})
);
console.log('setting up listener');
console.log('setting up listener to url', baseUrl);
const source = new EventSource(
`${baseUrl}/GetUpdateSSE.php?gameName=${gameID}&playerID=${gameInfo.playerID}&authKey=${gameInfo.authKey}`
`${baseUrl}GetUpdateSSE.php?gameName=${gameID}&playerID=${gameInfo.playerID}&authKey=${gameInfo.authKey}`
);
console.log(source);
source.onmessage = (e) => {
Expand Down

0 comments on commit efcff08

Please sign in to comment.