diff --git a/front/views/ProfileView.tsx b/front/views/ProfileView.tsx index 812cc94..2fc9413 100644 --- a/front/views/ProfileView.tsx +++ b/front/views/ProfileView.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { useWindowDimensions } from 'react-native'; -import { Column, Flex, Progress, Row, Text, Wrap, useTheme } from 'native-base'; +import { Column, Flex, Progress, Row, Text, View, Wrap, useTheme } from 'native-base'; import { RouteProps, useNavigation } from '../Navigation'; import UserAvatar from '../components/UserAvatar'; import { LoadingView } from '../components/Loading'; @@ -37,28 +37,41 @@ const ProfileView = (props: RouteProps<{}>) => { const level = xpToLevel(userQuery.data.data.xp); const { colors } = useTheme(); + const isBigScreen = layout.width > 650; + return ( - 650 ? 'row' : 'column', - alignItems: layout.width > 650 ? 'flex-start' : 'center', + display: 'flex', + flexDirection: isBigScreen ? 'row' : 'column', + alignItems: isBigScreen ? 'flex-start' : 'center', paddingBottom: 20, + gap: 5, justifyContent: 'space-between', }} > - 650 ? 'xl' : '2xl'} /> + + + 650 ? 20 : 0, - paddingTop: layout.width > 650 ? 0 : 20, - flex: 1, + paddingLeft: isBigScreen ? 20 : 0, + paddingTop: isBigScreen ? 0 : 20, + flexGrow: 1, + flexShrink: 1, width: '100%', }} > - ) => { type={'filled'} onPress={async () => navigation.navigate('Settings', {})} /> - + Account created on {userQuery.data.data.createdAt.toLocaleDateString()} - ) => { Your client ID is {userQuery.data.id} {userQuery.data.data.gamesPlayed} Games played - + - + {`${translate('level')} ${level}`}