Skip to content

Commit

Permalink
Slice name
Browse files Browse the repository at this point in the history
  • Loading branch information
joel-jeremy committed Jan 8, 2025
1 parent f0dd274 commit ca87e7b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/loot-core/src/client/app/appSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import {

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

const sliceName = 'app';

const createAppAsyncThunk = createAsyncThunk.withTypes<{
state: RootState;
dispatch: AppDispatch;
Expand All @@ -30,7 +32,7 @@ const initialState: AppState = {
};

export const updateApp = createAppAsyncThunk(
'app/updateApp',
`${sliceName}/updateApp`,
async (_, thunkApi) => {
await global.Actual.applyAppUpdate();
thunkApi.dispatch(setAppState({ updateInfo: null }));
Expand All @@ -40,7 +42,7 @@ export const updateApp = createAppAsyncThunk(
type SetAppStatePayload = Partial<AppState>;

const appSlice = createSlice({
name: 'app',
name: sliceName,
initialState,
reducers: {
setAppState(state, action: PayloadAction<SetAppStatePayload>) {
Expand Down

0 comments on commit ca87e7b

Please sign in to comment.