feat: move prevent window

This commit is contained in:
Nevo David 2024-09-21 00:21:15 +07:00
parent 9334f20f61
commit e43488cd1c
2 changed files with 2 additions and 2 deletions

View File

@ -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<HTMLDivElement>(() => {

View File

@ -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 (