File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
template/ts-support-template/src/Store Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -6,18 +6,15 @@ import {
66import FetchOne from '@/Store/User/FetchOne'
77import { navigateAndSimpleReset } from '@/Navigators/Root'
88import DefaultTheme from '@/Store/Theme/DefaultTheme'
9- import { AppDispatch } from '@/Store'
109
1110export default {
1211 initialState : buildAsyncState ( ) ,
13- action : buildAsyncActions (
14- 'startup/init' ,
15- async ( args : any , { dispatch } : { dispatch : AppDispatch } ) => {
12+ action : buildAsyncActions ( 'startup/init' , async ( args , { dispatch } ) => {
1613 // Timeout to fake waiting some process
1714 // Remove it, or keep it if you want display a beautiful splash screen ;)
1815 await new Promise ( ( resolve ) => setTimeout ( resolve , 1000 ) )
1916 // Here we load the user 1 for example, but you can for example load the connected user
20- await dispatch ( FetchOne . action ( 1 ) )
17+ await dispatch ( FetchOne . action ( '1' ) )
2118 await dispatch ( DefaultTheme . action ( { theme : 'default' , darkMode : null } ) )
2219 // Navigate and reset to the main navigator
2320 navigateAndSimpleReset ( 'Main' )
Original file line number Diff line number Diff line change @@ -51,4 +51,3 @@ const store = configureStore({
5151const persistor = persistStore ( store )
5252
5353export { store , persistor }
54- export type AppDispatch = typeof store . dispatch
You can’t perform that action at this time.
0 commit comments