Skip to content

Commit

Permalink
fix: move PushDispatcher back to store directory to avoid import orde…
Browse files Browse the repository at this point in the history
…r bug
  • Loading branch information
tm-ruxandra committed Nov 11, 2024
1 parent 11f8928 commit 99542bd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
import {waitFor} from '@testing-library/react-native';
import {render} from '@testing/integration/utils';

import * as syncHooks from 'terraso-mobile-client/components/sync/hooks/syncHooks';
import * as syncHooks from 'terraso-mobile-client/store/sync/hooks/syncHooks';
import {
PUSH_DEBOUNCE_MS,
PUSH_RETRY_INTERVAL_MS,
PushDispatcher,
} from 'terraso-mobile-client/components/sync/PushDispatcher';
} from 'terraso-mobile-client/store/sync/PushDispatcher';

jest.mock('terraso-mobile-client/components/sync/hooks/syncHooks', () => {
jest.mock('terraso-mobile-client/store/sync/hooks/syncHooks', () => {
return {
useDebouncedIsOffline: jest.fn(),
useDebouncedUnsyncedSiteIds: jest.fn(),
Expand Down
2 changes: 1 addition & 1 deletion dev-client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ import {captureConsoleIntegration} from '@sentry/core';
import * as Sentry from '@sentry/react-native';

import {RestrictByFlag} from 'terraso-mobile-client/components/RestrictByFlag';
import {PushDispatcher} from 'terraso-mobile-client/components/sync/PushDispatcher';
import {APP_CONFIG} from 'terraso-mobile-client/config';
import {ForegroundPermissionsProvider} from 'terraso-mobile-client/context/AppPermissionsContext';
import {ConnectivityContextProvider} from 'terraso-mobile-client/context/connectivity/ConnectivityContext';
Expand All @@ -59,6 +58,7 @@ import {
loadPersistedReduxState,
patchPersistedReduxState,
} from 'terraso-mobile-client/store/persistence';
import {PushDispatcher} from 'terraso-mobile-client/store/sync/PushDispatcher';
import {paperTheme, theme} from 'terraso-mobile-client/theme';

enableFreeze(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
useIsLoggedIn,
usePushDispatch,
useRetryInterval,
} from 'terraso-mobile-client/components/sync/hooks/syncHooks';
} from 'terraso-mobile-client/store/sync/hooks/syncHooks';

export const PUSH_DEBOUNCE_MS = 500;
export const PUSH_RETRY_INTERVAL_MS = 1000 * 60;
Expand Down

0 comments on commit 99542bd

Please sign in to comment.