diff --git a/my-bois/src/components/Bois.jsx b/my-bois/src/components/Bois.jsx index e98cd07..9ccca94 100644 --- a/my-bois/src/components/Bois.jsx +++ b/my-bois/src/components/Bois.jsx @@ -120,7 +120,7 @@ export const CentreBoi = () => { useKey(["H", "h"], () => showHide()); useKey("*", () => { - if (state === "started") { + if (state === "started" || state === "connected") { toggleCooldown(); } }); diff --git a/my-bois/src/components/Contexts.jsx b/my-bois/src/components/Contexts.jsx index 101b590..555e099 100644 --- a/my-bois/src/components/Contexts.jsx +++ b/my-bois/src/components/Contexts.jsx @@ -53,9 +53,9 @@ export const StatusContextProvider = ({children}) => { } else if (minutes < cooldownMin) { if (state === "connected") { setWorkout(await updateCooldownMins(workout, minutes)); - } - - setWorkout(await updateCooldownMins(workout, -1)); + } else { + setWorkout(await updateCooldownMins(workout, -1)); + } } }, [workout, workoutStatus, state]);