|
|
@ -41,6 +41,7 @@ export const CentreBoi = () => { |
|
|
|
const { |
|
|
|
state, program, setProgram, bike, setBike, bikes, programs, |
|
|
|
start, pause, stop, create, workoutStatus, |
|
|
|
hidden, setHidden, |
|
|
|
} = useContext(StatusContext); |
|
|
|
const [options, setOptions] = useState(null); |
|
|
|
const [current, setCurrent] = useState(0); |
|
|
@ -112,6 +113,17 @@ export const CentreBoi = () => { |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
useKey("H", () => showHide()); |
|
|
|
useKey("h", () => showHide()); |
|
|
|
|
|
|
|
function showHide() { |
|
|
|
setHidden(!hidden); |
|
|
|
} |
|
|
|
|
|
|
|
if (hidden) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
if (state === "started" && workoutStatus !== null) { |
|
|
|
const {minutes, seconds, calories} = workoutStatus; |
|
|
|
const diff = calculateDiff(program, minutes, seconds, calories); |
|
|
|