Skip to content

Commit

Permalink
Move createAppAsyncThunk
Browse files Browse the repository at this point in the history
  • Loading branch information
joel-jeremy committed Jan 9, 2025
1 parent ddaef03 commit 1fd660b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
3 changes: 2 additions & 1 deletion packages/loot-core/src/client/accounts/accountsSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { send } from '../../platform/client/fetch';
import { type AccountEntity, type TransactionEntity } from '../../types/models';
import { addNotification, getAccounts, getPayees } from '../actions';
import * as constants from '../constants';
import { createAppAsyncThunk, type AppDispatch } from '../store';
import { createAppAsyncThunk } from '../redux';
import { type AppDispatch } from '../store';

const sliceName = 'accounts';

Expand Down
8 changes: 8 additions & 0 deletions packages/loot-core/src/client/redux/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { createAsyncThunk } from '@reduxjs/toolkit';

import { type AppDispatch, type RootState } from '../store';

export const createAppAsyncThunk = createAsyncThunk.withTypes<{
state: RootState;
dispatch: AppDispatch;
}>();
11 changes: 1 addition & 10 deletions packages/loot-core/src/client/store/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import {
combineReducers,
configureStore,
createAsyncThunk,
} from '@reduxjs/toolkit';
import { combineReducers, configureStore } from '@reduxjs/toolkit';

import {
name as accountsSliceName,
Expand Down Expand Up @@ -63,8 +59,3 @@ export type AppStore = typeof store;
export type RootState = ReturnType<typeof store.getState>;
export type AppDispatch = typeof store.dispatch;
export type GetRootState = typeof store.getState;

export const createAppAsyncThunk = createAsyncThunk.withTypes<{
state: RootState;
dispatch: AppDispatch;
}>();

0 comments on commit 1fd660b

Please sign in to comment.