|
@@ -1,12 +1,215 @@
|
|
|
-import React from 'react';
|
|
|
-import { View, Text } from 'react-native';
|
|
|
+import React, { FC, ReactNode } from 'react';
|
|
|
+import { Image, Text, View } from 'react-native';
|
|
|
+import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';
|
|
|
+
|
|
|
+import { PageWrapper } from '../../../components';
|
|
|
+import { Colors } from '../../../theme';
|
|
|
+import { getFontSize } from '../../../utils';
|
|
|
+import { styles } from './styles';
|
|
|
+import { navigationOpts } from './navigation-opts';
|
|
|
+
|
|
|
+const regions = [
|
|
|
+ {
|
|
|
+ count: 28,
|
|
|
+ name: 'NM1301'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ count: 1,
|
|
|
+ name: 'M@P'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ count: 13,
|
|
|
+ name: 'UN'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ count: 14,
|
|
|
+ name: 'UN+'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ count: 16,
|
|
|
+ name: 'TCC'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ count: 3,
|
|
|
+ name: 'WHS'
|
|
|
+ }
|
|
|
+];
|
|
|
+
|
|
|
+const Tab = createMaterialTopTabNavigator();
|
|
|
+
|
|
|
+// TODO: refactor + connect with API
|
|
|
|
|
|
const ProfileScreen = () => {
|
|
|
return (
|
|
|
- <View>
|
|
|
- <Text>Profile Screen</Text>
|
|
|
+ <PageWrapper>
|
|
|
+ <View style={styles.pageWrapper}>
|
|
|
+ <View>
|
|
|
+ <Image
|
|
|
+ width={64}
|
|
|
+ height={64}
|
|
|
+ style={{ borderRadius: 64 / 2 }}
|
|
|
+ source={{
|
|
|
+ uri: 'https://harrymitsidis.com/wp-content/uploads/2023/05/harrymitsidis-SaoTome.jpg'
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </View>
|
|
|
+ <View>
|
|
|
+ <Text style={[styles.headerText, { fontSize: getFontSize(18) }]}>Harry Mitsidis</Text>
|
|
|
+ <View style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', gap: 10 }}>
|
|
|
+ <Image
|
|
|
+ source={{
|
|
|
+ uri: 'https://flagpedia.net/data/flags/w580/gr.webp'
|
|
|
+ }}
|
|
|
+ style={styles.countryFlag}
|
|
|
+ width={20}
|
|
|
+ height={20}
|
|
|
+ />
|
|
|
+ <Image
|
|
|
+ source={{
|
|
|
+ uri: 'https://upload.wikimedia.org/wikipedia/commons/b/b6/Flag_of_Canada.png'
|
|
|
+ }}
|
|
|
+ style={[styles.countryFlag, { marginLeft: -15 }]}
|
|
|
+ width={20}
|
|
|
+ height={20}
|
|
|
+ />
|
|
|
+ <Text>Age: 40</Text>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+ <Tab.Navigator
|
|
|
+ screenOptions={{
|
|
|
+ ...navigationOpts,
|
|
|
+ tabBarLabel: ({ children, color, focused }) => (
|
|
|
+ <Text style={[styles.headerText, { color }]}>{children}</Text>
|
|
|
+ )
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Tab.Screen name="Personal Info" component={PersonalInfo} />
|
|
|
+ <Tab.Screen name="Visited Regions" component={() => <Text>Visited Regions</Text>} />
|
|
|
+ <Tab.Screen name="Photos" component={() => <Text>Photos</Text>} />
|
|
|
+ </Tab.Navigator>
|
|
|
+ </PageWrapper>
|
|
|
+ );
|
|
|
+};
|
|
|
+
|
|
|
+const PersonalInfo = () => {
|
|
|
+ return (
|
|
|
+ <View style={{ marginTop: 20, gap: 20 }}>
|
|
|
+ <InfoItem inline={true} title={'Visited Regions'}>
|
|
|
+ {regions.map((data) => (
|
|
|
+ <View style={{ display: 'flex', flexDirection: 'column', gap: 5, alignItems: 'center' }}>
|
|
|
+ <Text
|
|
|
+ style={{
|
|
|
+ fontFamily: 'redhat-700',
|
|
|
+ color: Colors.DARK_BLUE,
|
|
|
+ fontSize: getFontSize(14)
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {data.count}
|
|
|
+ </Text>
|
|
|
+ <Text style={{ color: 'rgba(62, 100, 113, 1)', fontSize: getFontSize(12) }}>
|
|
|
+ {data.name}
|
|
|
+ </Text>
|
|
|
+ </View>
|
|
|
+ ))}
|
|
|
+ </InfoItem>
|
|
|
+ <View style={{ display: 'flex', flexDirection: 'row' }}>
|
|
|
+ <Text
|
|
|
+ style={{
|
|
|
+ flex: 1,
|
|
|
+ fontFamily: 'redhat-700',
|
|
|
+ color: Colors.DARK_BLUE,
|
|
|
+ fontSize: getFontSize(14)
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ Date of birth
|
|
|
+ </Text>
|
|
|
+ <Text
|
|
|
+ style={{
|
|
|
+ flex: 1,
|
|
|
+ color: 'rgba(62, 100, 113, 1)',
|
|
|
+ fontWeight: '400',
|
|
|
+ fontSize: getFontSize(14)
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ Jan 01, 1980
|
|
|
+ </Text>
|
|
|
+ </View>
|
|
|
+ <View style={{ display: 'flex', flexDirection: 'row' }}>
|
|
|
+ <Text
|
|
|
+ style={{
|
|
|
+ flex: 1,
|
|
|
+ fontFamily: 'redhat-700',
|
|
|
+ color: Colors.DARK_BLUE,
|
|
|
+ fontSize: getFontSize(14)
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ Region of origin
|
|
|
+ </Text>
|
|
|
+ <Text
|
|
|
+ style={{
|
|
|
+ flex: 1,
|
|
|
+ color: 'rgba(62, 100, 113, 1)',
|
|
|
+ fontWeight: '400',
|
|
|
+ fontSize: getFontSize(14)
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ Greece - Attica, Central and West (Athens, Lamia, Agrinio)
|
|
|
+ </Text>
|
|
|
+ </View>
|
|
|
+ <InfoItem title={'Bio'}>
|
|
|
+ <Text>
|
|
|
+ Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
|
|
|
+ commodo consequat.
|
|
|
+ </Text>
|
|
|
+ </InfoItem>
|
|
|
+ <InfoItem title={'Social links'}>
|
|
|
+ <View style={{ display: 'flex', flexDirection: 'row', gap: 10 }}>
|
|
|
+ <Image
|
|
|
+ width={20}
|
|
|
+ height={20}
|
|
|
+ source={{
|
|
|
+ uri: 'https://upload.wikimedia.org/wikipedia/commons/6/6c/Facebook_Logo_2023.png'
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <Image
|
|
|
+ width={20}
|
|
|
+ height={20}
|
|
|
+ source={{
|
|
|
+ uri: 'https://upload.wikimedia.org/wikipedia/commons/a/a5/Instagram_icon.png'
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <Image
|
|
|
+ width={20}
|
|
|
+ height={20}
|
|
|
+ source={{
|
|
|
+ uri: 'https://w7.pngwing.com/pngs/208/269/png-transparent-youtube-play-button-computer-icons-youtube-youtube-logo-angle-rectangle-logo-thumbnail.png'
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </View>
|
|
|
+ </InfoItem>
|
|
|
</View>
|
|
|
);
|
|
|
};
|
|
|
|
|
|
+const InfoItem: FC<{ title: string; inline?: boolean; children: ReactNode }> = ({
|
|
|
+ title,
|
|
|
+ inline,
|
|
|
+ children
|
|
|
+}) => (
|
|
|
+ <View>
|
|
|
+ <Text style={styles.headerText}>{title}</Text>
|
|
|
+ <View
|
|
|
+ style={{
|
|
|
+ display: 'flex',
|
|
|
+ flexDirection: inline ? 'row' : 'column',
|
|
|
+ justifyContent: 'space-evenly',
|
|
|
+ marginTop: 10
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {children}
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+);
|
|
|
+
|
|
|
export default ProfileScreen;
|