From 05bd5d9bf7221dbcac4f2807b89d0d08e020a136 Mon Sep 17 00:00:00 2001 From: Tim Glasgow Date: Sun, 24 Jul 2022 15:09:51 -0500 Subject: [PATCH] app init system action --- .../redux/actions/SystemActions.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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