From 7ae6c6102a0d92937688f83484658be424a753d4 Mon Sep 17 00:00:00 2001 From: yifanwww Date: Sat, 7 Oct 2023 18:59:16 +0800 Subject: [PATCH] refactor: create slice from reducers easier --- packages/app-renderer/src/MainWindow/redux/actions/slice.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/app-renderer/src/MainWindow/redux/actions/slice.ts b/packages/app-renderer/src/MainWindow/redux/actions/slice.ts index 288c728..c4a2dca 100644 --- a/packages/app-renderer/src/MainWindow/redux/actions/slice.ts +++ b/packages/app-renderer/src/MainWindow/redux/actions/slice.ts @@ -4,7 +4,7 @@ import { omitUnderscorePrefixActions } from 'src/utils/redux'; import type { StoreState } from '../types'; -import { _setAppDetails } from './reducers.app'; +import * as appReducers from './reducers.app'; export function getInitialState(): StoreState { return {}; @@ -14,7 +14,7 @@ const slice = createSlice({ name: 'Main', initialState: getInitialState(), reducers: { - _setAppDetails, + ...appReducers, }, });