From 900ee7f4d6817f42ac2bbbfe4da5cacdb1a6740f Mon Sep 17 00:00:00 2001 From: Tim Glasgow Date: Sat, 6 Aug 2022 13:51:08 -0500 Subject: [PATCH] add square finished action creator --- squarenotsquare/src/redux/actions/UserActions.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/squarenotsquare/src/redux/actions/UserActions.js b/squarenotsquare/src/redux/actions/UserActions.js index afb8299..920fd4f 100644 --- a/squarenotsquare/src/redux/actions/UserActions.js +++ b/squarenotsquare/src/redux/actions/UserActions.js @@ -1,5 +1,5 @@ import { squareNav } from "../../navigation/SquareNav"; -import { SQUARE_START } from "../types/SystemTypes"; +import { SQUARE_FINISHED, SQUARE_START } from "../types/UserTypes"; export function squareStartPressed() { return (dispatch) => { @@ -8,4 +8,13 @@ export function squareStartPressed() { type: SQUARE_START }); } +} + +export function squareFinished(score) { + return (dispatch) => { + squareNav('Score'); + dispatch({ + type: SQUARE_FINISHED + }); + } } \ No newline at end of file