Skip to content

Commit

Permalink
Allow finer-grained timers (#574)
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinejaussoin authored Sep 24, 2023
1 parent aa2d06e commit 492ae27
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand All @@ -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;
}
Expand All @@ -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}
/>
</Container>
);
Expand Down

0 comments on commit 492ae27

Please sign in to comment.