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 {
6
6
import FetchOne from '@/Store/User/FetchOne'
7
7
import { navigateAndSimpleReset } from '@/Navigators/Root'
8
8
import DefaultTheme from '@/Store/Theme/DefaultTheme'
9
- import { AppDispatch } from '@/Store'
10
9
11
10
export default {
12
11
initialState : buildAsyncState ( ) ,
13
- action : buildAsyncActions (
14
- 'startup/init' ,
15
- async ( args : any , { dispatch } : { dispatch : AppDispatch } ) => {
12
+ action : buildAsyncActions ( 'startup/init' , async ( args , { dispatch } ) => {
16
13
// Timeout to fake waiting some process
17
14
// Remove it, or keep it if you want display a beautiful splash screen ;)
18
15
await new Promise ( ( resolve ) => setTimeout ( resolve , 1000 ) )
19
16
// 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' ) )
21
18
await dispatch ( DefaultTheme . action ( { theme : 'default' , darkMode : null } ) )
22
19
// Navigate and reset to the main navigator
23
20
navigateAndSimpleReset ( 'Main' )
Original file line number Diff line number Diff line change @@ -51,4 +51,3 @@ const store = configureStore({
51
51
const persistor = persistStore ( store )
52
52
53
53
export { store , persistor }
54
- export type AppDispatch = typeof store . dispatch
You can’t perform that action at this time.
0 commit comments