Skip to content

Commit

Permalink
Disabled prevent exit by default (#800)
Browse files Browse the repository at this point in the history
  • Loading branch information
souyahia-monk authored Jun 21, 2024
1 parent 57f86b5 commit ad65b08
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
useLoadingState,
useWindowDimensions,
useObjectMemo,
usePreventExit,
} from '@monkvision/common';
import { MonkApiConfig } from '@monkvision/network';
import { useAnalytics } from '@monkvision/analytics';
Expand Down Expand Up @@ -146,7 +145,6 @@ export function PhotoCapture({
const analytics = useAnalytics();
const loading = useLoadingState();
const addDamageHandle = useAddDamageMode();
usePreventExit();
useTracking({ inspectionId, authToken: apiConfig.authToken });
useComplianceAnalytics({ inspectionId, sights });
const { adaptiveCameraConfig, uploadEventHandlers: adaptiveUploadEventHandlers } =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jest.mock('../../src/PhotoCapture/hooks', () => ({
import { act, render, waitFor } from '@testing-library/react';
import { Camera } from '@monkvision/camera-web';
import { expectPropsOnChildMock } from '@monkvision/test-utils';
import { useI18nSync, useLoadingState, usePreventExit } from '@monkvision/common';
import { useI18nSync, useLoadingState } from '@monkvision/common';
import { BackdropDialog, InspectionGallery } from '@monkvision/common-ui-web';
import { useMonitoring } from '@monkvision/monitoring';
import { PhotoCapture, PhotoCaptureHUD, PhotoCaptureProps } from '../../src';
Expand Down Expand Up @@ -432,13 +432,4 @@ describe('PhotoCapture component', () => {

unmount();
});

it('should ask the user for confirmation before exit', () => {
const props = createProps();
const { unmount } = render(<PhotoCapture {...props} />);

expect(usePreventExit).toHaveBeenCalled();

unmount();
});
});

0 comments on commit ad65b08

Please sign in to comment.