From 80f15d61ed9a118e538d31fccebddf45bf19f783 Mon Sep 17 00:00:00 2001 From: Tim Glasgow Date: Sat, 6 Aug 2022 13:50:21 -0500 Subject: [PATCH] score component --- squarenotsquare/src/screens/Score.js | 80 ++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 squarenotsquare/src/screens/Score.js diff --git a/squarenotsquare/src/screens/Score.js b/squarenotsquare/src/screens/Score.js new file mode 100644 index 0000000..2ed3d13 --- /dev/null +++ b/squarenotsquare/src/screens/Score.js @@ -0,0 +1,80 @@ +import React, { useEffect } from "react"; +import { BackHandler, SafeAreaView, Text, TouchableOpacity, View } from "react-native"; +import { styles } from './styles/AppStyles'; +import Slider from "../components/Slider"; +import { useDispatch } from "react-redux"; +import {goHome, goToScores} from '../redux/actions/SystemActions'; + +function Score(){ + const dispatch = useDispatch(); + + useEffect(() => { + BackHandler.addEventListener('hardwareBackPress', () => {return true}); + }, []) + + function onPressMainMenu(){ + dispatch(goHome()); + } + + function onPressHighScores(){ + dispatch(goToScores()); + } + + const now = new Date(Date.now()); + + return ( + + + + + TIME + + + {'(60 - 9.500) X 1000 = 50500'} + + + + + ANSWERS + + + {'20 X 1000 = 20000'} + + + + + + TOTAL + + + {'70500'} + + + + + + + + Main Menu + + + + + + + High Scores + + + + + + ) +} + +export default Score; \ No newline at end of file