Bläddra i källkod

menu drawer small fix

Viktoriia 1 år sedan
förälder
incheckning
e3f4e0f8e2
1 ändrade filer med 33 tillägg och 32 borttagningar
  1. 33 32
      src/components/MenuDrawer/index.tsx

+ 33 - 32
src/components/MenuDrawer/index.tsx

@@ -76,39 +76,40 @@ export const MenuDrawer = (props: any) => {
           />
         </View>
 
-        {token ? (
-          <View style={styles.bottomMenu}>
-            <MenuButton
-              label="Logout"
-              icon={<ExitIcon fill={Colors.RED} width={20} height={20} />}
-              red={true}
-              buttonFn={() =>
-                openModal('confirm', 'Are you sure you want to logout?', handleLogout)
-              }
-            />
-            <MenuButton
-              label="Delete account"
-              icon={<UserXMark fill={Colors.RED} width={20} height={20} />}
-              red={true}
-              buttonFn={() =>
-                openModal(
-                  'confirm',
-                  'Are you sure you want to delete your account?',
-                  handleDeleteAccount
-                )
-              }
-            />
-            <View style={{ gap: 6, marginTop: 16 }}>
-              <Text style={styles.bottomText}>Version {APP_VERSION}</Text>
-              <Text style={styles.bottomText}>
-                Map server:{'\n'}
-                {FASTEST_MAP_HOST}
-              </Text>
-            </View>
+        <View style={styles.bottomMenu}>
+          {token ? (
+            <>
+              <MenuButton
+                label="Logout"
+                icon={<ExitIcon fill={Colors.RED} width={20} height={20} />}
+                red={true}
+                buttonFn={() =>
+                  openModal('confirm', 'Are you sure you want to logout?', handleLogout)
+                }
+              />
+              <MenuButton
+                label="Delete account"
+                icon={<UserXMark fill={Colors.RED} width={20} height={20} />}
+                red={true}
+                buttonFn={() =>
+                  openModal(
+                    'confirm',
+                    'Are you sure you want to delete your account?',
+                    handleDeleteAccount
+                  )
+                }
+              />
+            </>
+          ) : null}
+
+          <View style={{ gap: 6, marginTop: 16 }}>
+            <Text style={styles.bottomText}>Version {APP_VERSION}</Text>
+            <Text style={styles.bottomText}>
+              Map server:{'\n'}
+              {FASTEST_MAP_HOST}
+            </Text>
           </View>
-        ) : (
-          <View style={styles.bottomMenu} />
-        )}
+        </View>
       </View>
 
       <WarningModal