From 1d98318c088c57d4523399b71ffbd1a82003268e Mon Sep 17 00:00:00 2001 From: Antoine Jaussoin Date: Sun, 24 Sep 2023 17:01:15 +0100 Subject: [PATCH] Allow finer-grained timers --- .../session-editor/sections/timer/DurationSelection.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/session-editor/sections/timer/DurationSelection.tsx b/frontend/src/views/session-editor/sections/timer/DurationSelection.tsx index 6b275cf42..c6e1bb936 100644 --- a/frontend/src/views/session-editor/sections/timer/DurationSelection.tsx +++ b/frontend/src/views/session-editor/sections/timer/DurationSelection.tsx @@ -16,6 +16,7 @@ type DurationSelectionProps = { }; const marks: Mark[] = [ + { value: 1, label: '1m' }, { value: 15, label: '15m' }, { value: 30, label: '30m' }, { value: 45, label: '45m' }, @@ -29,7 +30,7 @@ export default function DurationSelection({ const handleChange = useCallback( (_event: Event, value: number | number[]) => { // Allows testing on a small duration in development mode - if (!isProduction() && value === 5) { + if (!isProduction() && value === 1) { onChange(10); return; } @@ -43,9 +44,9 @@ export default function DurationSelection({ value={duration / 60} onChange={handleChange} marks={marks} - min={5} + min={1} max={60} - step={5} + step={1} /> );