|
@ -1,12 +1,14 @@ |
|
|
import React, { useEffect } from "react"; |
|
|
import React, { useEffect, useRef } from "react"; |
|
|
import { BackHandler, SafeAreaView, Text, TouchableOpacity, View } from "react-native"; |
|
|
import { BackHandler, SafeAreaView, Text, TouchableOpacity, View } from "react-native"; |
|
|
import { styles } from './styles/AppStyles'; |
|
|
import { styles } from './styles/AppStyles'; |
|
|
import Slider from "../components/Slider"; |
|
|
import Slider from "../components/Slider"; |
|
|
import { useDispatch } from "react-redux"; |
|
|
import { useDispatch } from "react-redux"; |
|
|
import {goHome} from '../redux/actions/SystemActions'; |
|
|
import {goHome} from '../redux/actions/SystemActions'; |
|
|
|
|
|
import DbAPI from "../realm/DbAPI"; |
|
|
|
|
|
|
|
|
function HighScore(){ |
|
|
function HighScore(){ |
|
|
const dispatch = useDispatch(); |
|
|
const dispatch = useDispatch(); |
|
|
|
|
|
const scores = useRef(DbAPI.getHighScores()); |
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
useEffect(() => { |
|
|
BackHandler.addEventListener('hardwareBackPress', () => {return true}); |
|
|
BackHandler.addEventListener('hardwareBackPress', () => {return true}); |
|
|