diff --git a/squarenotsquare/src/redux/actions/UserActions.js b/squarenotsquare/src/redux/actions/UserActions.js index 920fd4f..7bd1930 100644 --- a/squarenotsquare/src/redux/actions/UserActions.js +++ b/squarenotsquare/src/redux/actions/UserActions.js @@ -10,9 +10,12 @@ export function squareStartPressed() { } } -export function squareFinished(score) { - return (dispatch) => { +export function squareFinished(score, finalTime) { + return (dispatch, getState) => { squareNav('Score'); + let newUser = getState().user; + newUser.lastGameTime = finalTime; + newUser.lastGameScore = score; dispatch({ type: SQUARE_FINISHED });