Tim Glasgow
2 years ago
9 changed files with 34 additions and 31 deletions
@ -1,8 +1,8 @@ |
|||
import { createRef } from "react"; |
|||
|
|||
export const mainRef = createRef(); |
|||
export const MainRef = createRef(); |
|||
|
|||
export function navigate(name, params) { |
|||
mainRef.current?.navigate(name, params); |
|||
MainRef.current?.navigate(name, params); |
|||
return true; |
|||
} |
@ -1,21 +1,20 @@ |
|||
import { initDB } from "../../realm/dbInit"; |
|||
import dbAPI from "../../realm/dbAPI"; |
|||
import { initDB } from "../../realm/DbInit"; |
|||
import DbAPI from "../../realm/DbAPI"; |
|||
import { APP_INIT } from "../types/SystemTypes"; |
|||
|
|||
export function appInit() { |
|||
return async (dispatch) => { |
|||
await dbAPI.initDB(); |
|||
await DbAPI.initDB(); |
|||
dispatch(onInit()); |
|||
} |
|||
} |
|||
|
|||
function onInit() { |
|||
return (dispatch) => { |
|||
return (dispatch, getState) => { |
|||
let system = getState().system; |
|||
dispatch({ |
|||
type: APP_INIT |
|||
//system: system
|
|||
//user: user
|
|||
//score: score
|
|||
type: APP_INIT, |
|||
system: system |
|||
}); |
|||
} |
|||
} |
Loading…
Reference in new issue