Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit 5e5085b

Browse files
committed
fix: application schedule incorrect time
Reusing the duration options function but schedule and search are in different formats, seconds and minutes.
1 parent e9ac1f6 commit 5e5085b

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

apps/ui/components/application/ApplicationEvent.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,12 @@ function ApplicationEventInner({
177177
return "";
178178
};
179179

180-
const durationOptions = getDurationOptions(t);
180+
// convert from minutes to seconds (search page uses minutes, this uses seconds)
181+
const durationOptions = getDurationOptions(t).map((x) => ({
182+
label: x.label,
183+
value: x.value * 60,
184+
}));
185+
181186
return (
182187
<>
183188
<SubHeadLine>

apps/ui/modules/const.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ function durationMinuteOptions(t: TFunction) {
5555
return durations;
5656
}
5757

58+
/// @returns an array of duration options in minutes
5859
export function getDurationOptions(t: TFunction): DurationOption[] {
5960
const times: DurationOption[] = [];
6061
let hour = 2;

0 commit comments

Comments
 (0)