diff --git a/squarenotsquare/redux/actions/SystemActions.js b/squarenotsquare/redux/actions/SystemActions.js index e69de29..ff3c838 100644 --- a/squarenotsquare/redux/actions/SystemActions.js +++ b/squarenotsquare/redux/actions/SystemActions.js @@ -0,0 +1,19 @@ +import { initDB } from "../../realm/dbInit"; +import { realmDB } from "../../realm/dbAPI"; +import { APP_INIT } from "../types/SystemTypes"; + +export function appInit() { + return async (dispatch) => { + await initDB(); + dispatch(onInit()); + } +} + +function onInit() { + dispatch({ + type: APP_INIT + //system: system + //user: user + //score: score + }); +} \ No newline at end of file