File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export { default as Logo } from 'assets/Logo';
33
33
export { default as Modal } from 'components/Modal/Modal' ;
34
34
export { default as useCreateTheme } from 'hooks/useCreateTheme' ;
35
35
export { tabConfig } from 'components/Tabs/Tabs.constants' ;
36
- export { store as locustStore } from 'redux/store' ;
36
+ export { store as locustStore , createStore as createLocustStore } from 'redux/store' ;
37
37
export { pushQuery } from 'utils/url' ;
38
38
39
39
export type { IRootState } from 'redux/store' ;
Original file line number Diff line number Diff line change 1
1
import { configureStore } from '@reduxjs/toolkit' ;
2
2
3
3
import { api } from 'redux/api/swarm' ;
4
- import rootReducer from 'redux/slice/root.slice' ;
4
+ import rootReducer , { IRootState } from 'redux/slice/root.slice' ;
5
5
6
6
export const store = configureStore ( {
7
7
reducer : rootReducer ,
8
8
middleware : getDefaultMiddleware => getDefaultMiddleware ( ) . concat ( api . middleware ) ,
9
9
} ) ;
10
10
11
+ export const createStore = ( preloadedState : Partial < IRootState > ) =>
12
+ configureStore ( {
13
+ reducer : rootReducer ,
14
+ middleware : getDefaultMiddleware => getDefaultMiddleware ( ) . concat ( api . middleware ) ,
15
+ preloadedState,
16
+ } ) ;
17
+
11
18
export type { IRootState , Action } from 'redux/slice/root.slice' ;
12
19
export default configureStore ;
You can’t perform that action at this time.
0 commit comments