diff --git a/apps/frontend/src/components/launches/menu/menu.tsx b/apps/frontend/src/components/launches/menu/menu.tsx index c63c3b625..c358109df 100644 --- a/apps/frontend/src/components/launches/menu/menu.tsx +++ b/apps/frontend/src/components/launches/menu/menu.tsx @@ -7,7 +7,6 @@ import interClass from '@gitroom/react/helpers/inter.font'; import { useModals } from '@mantine/modals'; import { TimeTable } from '@gitroom/frontend/components/launches/time.table'; import { useCalendar } from '@gitroom/frontend/components/launches/calendar.context'; -import { usePreventWindowUnload } from '@gitroom/react/helpers/use.prevent.window.unload'; export const Menu: FC<{ canEnable: boolean; @@ -20,7 +19,6 @@ export const Menu: FC<{ const fetch = useFetch(); const { integrations } = useCalendar(); const toast = useToaster(); - usePreventWindowUnload(true); const modal = useModals(); const [show, setShow] = useState(false); const ref = useClickOutside(() => { diff --git a/apps/frontend/src/components/launches/time.table.tsx b/apps/frontend/src/components/launches/time.table.tsx index c679dd813..810e2e91e 100644 --- a/apps/frontend/src/components/launches/time.table.tsx +++ b/apps/frontend/src/components/launches/time.table.tsx @@ -12,6 +12,7 @@ import { useFetch } from '@gitroom/helpers/utils/custom.fetch'; import useKeypress from 'react-use-keypress'; import { useModals } from '@mantine/modals'; import { sortBy } from 'lodash'; +import { usePreventWindowUnload } from '@gitroom/react/helpers/use.prevent.window.unload'; dayjs.extend(utc); dayjs.extend(timezone); @@ -37,6 +38,7 @@ export const TimeTable: FC<{ const [minute, setMinute] = useState(0); const fetch = useFetch(); const modal = useModals(); + usePreventWindowUnload(true); const askClose = useCallback(async () => { if (