diff --git a/apps/web/components/eventtype/EventLimitsTab.tsx b/apps/web/components/eventtype/EventLimitsTab.tsx index 07cb287871..033aa3a0c8 100644 --- a/apps/web/components/eventtype/EventLimitsTab.tsx +++ b/apps/web/components/eventtype/EventLimitsTab.tsx @@ -133,108 +133,110 @@ export const EventLimitsTab = ({ eventType }: Pick -
-
- - { - const beforeBufferOptions = [ - { - label: t("event_buffer_default"), - value: 0, - }, - ...[5, 10, 15, 20, 30, 45, 60, 90, 120].map((minutes) => ({ - label: minutes + " " + t("minutes"), - value: minutes, - })), - ]; - return ( - { + if (val) onChange(val.value); + }} + defaultValue={ + beforeBufferOptions.find((option) => option.value === value) || beforeBufferOptions[0] + } + options={beforeBufferOptions} + /> + ); + }} + /> +
+
+ + { + const afterBufferOptions = [ + { + label: t("event_buffer_default"), + value: 0, + }, + ...[5, 10, 15, 20, 30, 45, 60, 90, 120].map((minutes) => ({ + label: minutes + " " + t("minutes"), + value: minutes, + })), + ]; + return ( + { - if (val) onChange(val.value); - }} - defaultValue={ - afterBufferOptions.find((option) => option.value === value) || afterBufferOptions[0] - } - options={afterBufferOptions} - /> - ); - }} - /> -
-
-
-
- - -
-
- - { - const slotIntervalOptions = [ - { - label: t("slot_interval_default"), - value: -1, - }, - ...[5, 10, 15, 20, 30, 45, 60, 75, 90, 105, 120].map((minutes) => ({ - label: minutes + " " + t("minutes"), - value: minutes, - })), - ]; - return ( - { + formMethods.setValue("slotInterval", val && (val.value || 0) > 0 ? val.value : null); + }} + defaultValue={ + slotIntervalOptions.find((option) => option.value === eventType.slotInterval) || + slotIntervalOptions[0] + } + options={slotIntervalOptions} + /> + ); + }} + /> +