feat: move prevent window
This commit is contained in:
parent
9334f20f61
commit
e43488cd1c
|
|
@ -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>(() => {
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
|
|
|
|||
Loading…
Reference in New Issue