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