Browse Source

home and score action creators

pull/8/head
Tim Glasgow 2 years ago
parent
commit
d6f81b7ab2
  1. 22
      squarenotsquare/src/redux/actions/SystemActions.js

22
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
});
}
}
Loading…
Cancel
Save