Browse Source

connect highscores button

pull/8/head
Tim Glasgow 3 years ago
parent
commit
4af2ed65fa
  1. 10
      squarenotsquare/src/screens/Home.js

10
squarenotsquare/src/screens/Home.js

@ -8,6 +8,7 @@ import Metrics from "../themes/Metrics";
import Slider from "../components/Slider";
import { useDispatch } from "react-redux";
import {squareStartPressed} from '../redux/actions/UserActions';
import { goToScores } from "../redux/actions/SystemActions";
function Home(){
const dispatch = useDispatch();
@ -20,6 +21,10 @@ function Home(){
dispatch(squareStartPressed());
}
function onPressHighScores(){
dispatch(goToScores());
}
const now = new Date(Date.now());
return (
@ -54,7 +59,10 @@ function Home(){
</TouchableOpacity>
</Slider>
<Slider origin={400} duration={750} delay={100}>
<TouchableOpacity style={[styles.centeredJustify, styles.darkGreen, styles.menuButton, styles.dropShadow]}>
<TouchableOpacity
onPress={onPressHighScores}
style={[styles.centeredJustify, styles.darkGreen, styles.menuButton, styles.dropShadow]}
>
<Text style={[styles.lightText, styles.headerTitleFont, styles.boldText, styles.centeredText]}>
High Scores
</Text>

Loading…
Cancel
Save