Browse Source

Stuffety-stuff

master
Stian Fredrik Aune 5 years ago
parent
commit
41ca13af8a
  1. 2
      my-bois/src/components/Bois.jsx
  2. 6
      my-bois/src/components/Contexts.jsx

2
my-bois/src/components/Bois.jsx

@ -120,7 +120,7 @@ export const CentreBoi = () => {
useKey(["H", "h"], () => showHide()); useKey(["H", "h"], () => showHide());
useKey("*", () => { useKey("*", () => {
if (state === "started") {
if (state === "started" || state === "connected") {
toggleCooldown(); toggleCooldown();
} }
}); });

6
my-bois/src/components/Contexts.jsx

@ -53,9 +53,9 @@ export const StatusContextProvider = ({children}) => {
} else if (minutes < cooldownMin) { } else if (minutes < cooldownMin) {
if (state === "connected") { if (state === "connected") {
setWorkout(await updateCooldownMins(workout, minutes)); setWorkout(await updateCooldownMins(workout, minutes));
}
setWorkout(await updateCooldownMins(workout, -1));
} else {
setWorkout(await updateCooldownMins(workout, -1));
}
} }
}, [workout, workoutStatus, state]); }, [workout, workoutStatus, state]);

Loading…
Cancel
Save