From fda3390cd29b786f97a25a6d74f78a3b4d8a5440 Mon Sep 17 00:00:00 2001 From: Tim Glasgow Date: Sat, 6 Aug 2022 13:57:27 -0500 Subject: [PATCH] initial user state --- squarenotsquare/src/redux/reducers/UserReducer.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/squarenotsquare/src/redux/reducers/UserReducer.js b/squarenotsquare/src/redux/reducers/UserReducer.js index 5b79559..4346c1a 100644 --- a/squarenotsquare/src/redux/reducers/UserReducer.js +++ b/squarenotsquare/src/redux/reducers/UserReducer.js @@ -4,7 +4,12 @@ import { SQUARE_FINISHED } from '../types/UserTypes'; -function usr(state = {}, action) { +const initialUserState = { + lastGameTime: null, + lastGameScore: null +} + +function usr(state = initialUserState, action) { switch (action.type) { case SQUARE_START: case SQUARE_FINISHED: