|
@ -1,5 +1,5 @@ |
|
|
import DbAPI from "../../realm/DbAPI"; |
|
|
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"; |
|
|
import { squareNav } from "../../navigation/SquareNav"; |
|
|
|
|
|
|
|
|
export function appInit() { |
|
|
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() { |
|
|
function onInit() { |
|
|
return (dispatch) => { |
|
|
return (dispatch) => { |
|
|
dispatch({ |
|
|
dispatch({ |
|
|
type: APP_INIT |
|
|
type: APP_INIT |
|
|
//system: system
|
|
|
//system: system
|
|
|
//user: user
|
|
|
|
|
|
//score: score
|
|
|
|
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |