diff --git a/public/index.html b/public/index.html index 6d80583..efefe27 100644 --- a/public/index.html +++ b/public/index.html @@ -21,7 +21,7 @@ Learn how to configure a non-root public URL by running `npm run build` or have a look at the documentation https://create-react-app.dev/docs/using-the-public-folder/. --> - SoPra FS24 - Group XX + SoPra FS24 - Group 09 diff --git a/src/components/ui/AudioRecorder.tsx b/src/components/ui/AudioRecorder.tsx index 804fcde..e766cb4 100644 --- a/src/components/ui/AudioRecorder.tsx +++ b/src/components/ui/AudioRecorder.tsx @@ -367,9 +367,15 @@ export const AudioRecorder = React.forwardRef((props,ref) => { disabled = {props.disabled || !waveAvailable} className="audio-recorder button-container playback-rate-dropdown" onChange={(e) => { - const rate = parseFloat(e.target.value); - setPlaybackRate(rate); - wavesurfer.current?.setPlaybackRate(rate, true); + try { + // console.warn("e", e); + const rate = parseFloat(e); + setPlaybackRate(rate); + wavesurfer.current?.setPlaybackRate(rate, true); + } + catch (error) { + console.error("Failed to set playback rate", error); + } }} defaultValue={playbackRate} options={[ diff --git a/src/components/views/Gameroom.tsx b/src/components/views/Gameroom.tsx index be0b6e3..8930d8f 100644 --- a/src/components/views/Gameroom.tsx +++ b/src/components/views/Gameroom.tsx @@ -487,7 +487,6 @@ const Gameroom = () => { console.log(playerLists); const LeaderBoard = ({ playerStatus }) => { - // console.log("123456") console.log("[LeaderBoard]",playerStatus) const sortedPlayerStatus = playerStatus.slice().sort((a, b) => b.score.total - a.score.total); return ( diff --git a/src/components/views/Lobby.tsx b/src/components/views/Lobby.tsx index b192d00..809b6b1 100644 --- a/src/components/views/Lobby.tsx +++ b/src/components/views/Lobby.tsx @@ -314,7 +314,7 @@ const Lobby = () => { async function enterRoom(roomId, userId) { try { const requestBody = JSON.stringify({ id: userId }); - await api.put(`/games/${roomId}`, requestBody); + // await api.put(`/games/${roomId}`, requestBody); } catch (error) { handleError(error); @@ -561,11 +561,11 @@ const Lobby = () => { placeholder="2" value={numRounds} onChange={e => { - const value = parseInt(e.target.value, 10); - setNumRounds(value >= 2 && value <= 10 ? value : ""); + const value = parseInt(e.target.value, 3); + setNumRounds(value >= 2 && value <= 3 ? value : ""); }} min={2} - max={10} + max={3} /> { onChange={(value) => setRoomTheme(value)} />
-
diff --git a/src/helpers/getDomain.js b/src/helpers/getDomain.js index ecca1c4..85fd488 100644 --- a/src/helpers/getDomain.js +++ b/src/helpers/getDomain.js @@ -8,6 +8,7 @@ import { isProduction } from "./isProduction" */ export const getDomain = () => { const prodUrl = "https://sopra-fs24-group-09-server.oa.r.appspot.com/" // TODO: insert your prod url for server (once deployed) + // const devUrl = "https://sopra-fs24-group-09-server.oa.r.appspot.com/" // TODO: insert your prod url for server (once deployed) const devUrl = "http://localhost:8080" return isProduction() ? prodUrl : devUrl