diff --git a/squarenotsquare/src/redux/actions/SystemActions.js b/squarenotsquare/src/redux/actions/SystemActions.js index 6a00bb0..557ba64 100644 --- a/squarenotsquare/src/redux/actions/SystemActions.js +++ b/squarenotsquare/src/redux/actions/SystemActions.js @@ -1,5 +1,5 @@ import DbAPI from "../../realm/DbAPI"; -import { APP_INIT } from "../types/SystemTypes"; +import { APP_INIT, NAV_HOME, NAV_SCORES } from "../types/SystemTypes"; import { squareNav } from "../../navigation/SquareNav"; export function appInit() { @@ -10,13 +10,29 @@ export function appInit() { } } +export function goHome() { + return (dispatch) => { + squareNav('Home'); + dispatch({ + type: NAV_HOME + }) + } +} + +export function goToScores() { + return (dispatch) => { + squareNav('HighScores'); + dispatch({ + NAV_SCORES + }) + } +} + function onInit() { return (dispatch) => { dispatch({ type: APP_INIT //system: system - //user: user - //score: score }); } } \ No newline at end of file