Skip to content

Commit

Permalink
Remove action imports
Browse files Browse the repository at this point in the history
  • Loading branch information
joel-jeremy committed Jan 14, 2025
1 parent 44bec30 commit aec5914
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 0 additions & 2 deletions packages/desktop-client/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { bindActionCreators } from '@reduxjs/toolkit';
import { createRoot } from 'react-dom/client';

import * as accountsSlice from 'loot-core/src/client/accounts/accountsSlice';
import * as actions from 'loot-core/src/client/actions';
import * as appSlice from 'loot-core/src/client/app/appSlice';
import * as budgetsSlice from 'loot-core/src/client/budgets/budgetsSlice';
import * as modalsSlice from 'loot-core/src/client/modals/modalsSlice';
Expand All @@ -39,7 +38,6 @@ import 'focus-visible';

const boundActions = bindActionCreators(
{
...actions,
...accountsSlice.actions,
...appSlice.actions,
...budgetsSlice.actions,
Expand Down
20 changes: 12 additions & 8 deletions packages/loot-core/src/client/app/appSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { getUploadError } from '../../shared/errors';
import { type AccountEntity } from '../../types/models';
import { type AtLeastOne } from '../../types/util';
import { syncAccounts } from '../accounts/accountsSlice';
import { loadPrefs } from '../actions';
import { pushModal } from '../modals/modalsSlice';
import { createAppAsyncThunk } from '../redux';
import { loadPrefs } from '../prefs/prefsSlice';

Check warning on line 10 in packages/loot-core/src/client/app/appSlice.ts

View workflow job for this annotation

GitHub Actions / lint

`../prefs/prefsSlice` import should occur before import of `../redux`

const sliceName = 'app';

Expand Down Expand Up @@ -52,20 +52,24 @@ export const resetSync = createAppAsyncThunk(
) {
dispatch(
pushModal({
name: 'fix-encryption-key',
options: {
onSuccess: () => {
// TODO: There won't be a loading indicator for this
dispatch(resetSync());
modal: {
name: 'fix-encryption-key',
options: {
onSuccess: () => {
// TODO: There won't be a loading indicator for this
dispatch(resetSync());
},
},
},
}),
);
} else if (error.reason === 'encrypt-failure') {
dispatch(
pushModal({
name: 'create-encryption-key',
options: { recreate: true },
modal: {
name: 'create-encryption-key',
options: { recreate: true },
},
}),
);
}
Expand Down

0 comments on commit aec5914

Please sign in to comment.