From c35522a0bce4a6af7f010db17d8c6e95d5151190 Mon Sep 17 00:00:00 2001
From: vicim994 <72468847+vicim994@users.noreply.github.com>
Date: Mon, 9 May 2022 08:38:21 +0200
Subject: [PATCH] ...

---
 UIStuff/UI_Stuff/ChallengeData.tsx     | 2 +-
 UIStuff/UI_Stuff/components/TopBar.Tsx | 4 ++++
 UIStuff/UI_Stuff/screens/MainPage.tsx  | 9 ++++++++-
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/UIStuff/UI_Stuff/ChallengeData.tsx b/UIStuff/UI_Stuff/ChallengeData.tsx
index 0abdff09..4f17f16f 100644
--- a/UIStuff/UI_Stuff/ChallengeData.tsx
+++ b/UIStuff/UI_Stuff/ChallengeData.tsx
@@ -116,7 +116,7 @@ export function getRank(){
     Axios.get(`http://213.188.152.167:5000/challengeData/${getPlayerId()}/5`).then((response) => {       
         
         size = response.data.size();
-        for (let i = 0; i < size; i++) {
+        for (var i = 0; i < size; i++) {
             rank = rank + getMinPerK(response.data[i].time, response.data[i].distance);
         }
         
diff --git a/UIStuff/UI_Stuff/components/TopBar.Tsx b/UIStuff/UI_Stuff/components/TopBar.Tsx
index 54f66b0c..f8f15f5a 100644
--- a/UIStuff/UI_Stuff/components/TopBar.Tsx
+++ b/UIStuff/UI_Stuff/components/TopBar.Tsx
@@ -22,6 +22,10 @@ import AsyncStorage from '@react-native-async-storage/async-storage';
  */
 export default function TopBar({ navigation, route }: RootStackScreenProps<'Modal'>){
 
+    const [lvl, setLvl] = useState(0);
+    const [lvlProgress, setLvlProgress] = useState(0);
+    const [coins, setCoins] = useState(0);
+    
     
     
   
diff --git a/UIStuff/UI_Stuff/screens/MainPage.tsx b/UIStuff/UI_Stuff/screens/MainPage.tsx
index 3171c506..112fa248 100644
--- a/UIStuff/UI_Stuff/screens/MainPage.tsx
+++ b/UIStuff/UI_Stuff/screens/MainPage.tsx
@@ -21,6 +21,13 @@ import LoginPage from './Login';
  */
 export default function MainPageScreen({navigation}: RootStackScreenProps<'CreateRunPage'>) {
 
+  const [refresh, setRefresh] = useState(0);
+
+  useEffect(() => {
+    
+    
+  }, [refresh])
+
   
 
   return (
@@ -52,7 +59,7 @@ export default function MainPageScreen({navigation}: RootStackScreenProps<'Creat
               </Pressable>         
               <View style={{ backgroundColor: 'rgba(0,0,0,0)' }}> 
     </View>
-         <LoginPage></LoginPage>
+         <LoginPage ></LoginPage>
         </View>
         </ImageBackground>
     </View>
-- 
GitLab