import React from "react"; import { translate } from "../i18n/i18n"; import { Box, useBreakpointValue, Text, VStack, Progress } from 'native-base'; import { useNavigation } from "@react-navigation/native"; import { Pressable, Image } from "native-base"; import Card from "../components/Card"; const ProgressBar = ({ xp }: { xp: number}) => { const level = Math.floor(xp / 1000); const nextLevel = level + 1; const nextLevelThreshold = nextLevel * 1000; const progessValue = 100 * xp / nextLevelThreshold; const nav = useNavigation(); const flexDirection = useBreakpointValue({ base: 'column', xl: "row"}); return ( nav.navigate('User')} > Profile picture {`${translate('level')} ${level}`} {xp} / {nextLevelThreshold} {translate('levelProgress')} ); } export default ProgressBar;