Front: User Avatar

This commit is contained in:
Arthur Jamet
2023-07-24 13:39:36 +01:00
committed by Zoe Roux
parent 930191569f
commit 9f542fc9dd
5 changed files with 38 additions and 110 deletions
+4 -14
View File
@@ -1,9 +1,9 @@
import React from 'react';
import { translate } from '../i18n/i18n';
import { Box, Text, VStack, Progress, Stack, AspectRatio } from 'native-base';
import { Box, Text, VStack, Progress, Stack } from 'native-base';
import { useNavigation } from '../Navigation';
import { Image } from 'native-base';
import Card from '../components/Card';
import UserAvatar from './UserAvatar';
const ProgressBar = ({ xp }: { xp: number }) => {
const level = Math.floor(xp / 1000);
@@ -15,18 +15,8 @@ const ProgressBar = ({ xp }: { xp: number }) => {
return (
<Card w="100%" onPress={() => nav.navigate('User')}>
<Stack padding={4} space={2} direction="row">
<AspectRatio ratio={1}>
<Image
position="relative"
borderRadius={100}
source={{
uri: 'https://wallpaperaccess.com/full/317501.jpg', // TODO : put the actual profile pic
}}
alt="Profile picture"
zIndex={0}
/>
</AspectRatio>
<Stack padding={4} space={2} direction="row" alignItems="center">
<UserAvatar />
<VStack alignItems={'center'} flexGrow={1} space={2}>
<Text>{`${translate('level')} ${level}`}</Text>
<Box w="100%">