Skip to content

Commit

Permalink
feat: move prevent window
Browse files Browse the repository at this point in the history
  • Loading branch information
Nevo David committed Sep 20, 2024
1 parent 9334f20 commit e43488c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions apps/frontend/src/components/launches/menu/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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>(() => {
Expand Down
2 changes: 2 additions & 0 deletions apps/frontend/src/components/launches/time.table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 (
Expand Down

0 comments on commit e43488c

Please sign in to comment.