|
@@ -0,0 +1,237 @@
|
|
|
+import React, { FC, useCallback, useEffect, useState } from 'react';
|
|
|
+import { View, Text, Image, TouchableOpacity, Platform } from 'react-native';
|
|
|
+import ImageView from 'better-react-native-image-viewing';
|
|
|
+import { styles } from './styles';
|
|
|
+import { CommonActions, useFocusEffect, useNavigation } from '@react-navigation/native';
|
|
|
+import { Colors } from 'src/theme';
|
|
|
+import { styles as ButtonStyles } from 'src/components/RegionPopup/style';
|
|
|
+
|
|
|
+import { ScrollView } from 'react-native-gesture-handler';
|
|
|
+import { NAVIGATION_PAGES } from 'src/types';
|
|
|
+import { API_HOST } from 'src/constants';
|
|
|
+import { StoreType, storage } from 'src/storage';
|
|
|
+import { ButtonVariants } from 'src/types/components';
|
|
|
+import formatNumber from '../../TravelsScreen/utils/formatNumber';
|
|
|
+
|
|
|
+import ChevronLeft from 'assets/icons/chevron-left.svg';
|
|
|
+import MapSvg from 'assets/icons/travels-screens/map-location.svg';
|
|
|
+import AddImgSvg from 'assets/icons/travels-screens/add-img.svg';
|
|
|
+import ShareIcon from 'assets/icons/share.svg';
|
|
|
+
|
|
|
+const EventsScreen = () => {
|
|
|
+ const token = (storage.get('token', StoreType.STRING) as string) ?? null;
|
|
|
+ const navigation = useNavigation();
|
|
|
+ const [isLoading, setIsLoading] = useState(true);
|
|
|
+
|
|
|
+ return (
|
|
|
+ <View style={styles.container}>
|
|
|
+ <TouchableOpacity
|
|
|
+ onPress={() => {
|
|
|
+ navigation.goBack();
|
|
|
+ }}
|
|
|
+ style={styles.backButton}
|
|
|
+ >
|
|
|
+ <View style={styles.chevronWrapper}>
|
|
|
+ <ChevronLeft fill={Colors.WHITE} />
|
|
|
+ </View>
|
|
|
+ </TouchableOpacity>
|
|
|
+
|
|
|
+ <ScrollView
|
|
|
+ contentContainerStyle={{}}
|
|
|
+ nestedScrollEnabled={true}
|
|
|
+ showsVerticalScrollIndicator={false}
|
|
|
+ >
|
|
|
+ <View style={styles.emptyImage}>
|
|
|
+ <Image
|
|
|
+ source={require('../../../../../assets/images/logo-opacity.png')}
|
|
|
+ style={{ width: 100, height: 100 }}
|
|
|
+ />
|
|
|
+ <Text style={styles.emptyImageText}>No image available at this location</Text>
|
|
|
+ </View>
|
|
|
+ <TouchableOpacity onPress={() => {}} style={styles.addPhotoButton}>
|
|
|
+ <View style={styles.chevronWrapper}>
|
|
|
+ <AddImgSvg fill={Colors.WHITE} width={20} height={20} />
|
|
|
+ </View>
|
|
|
+ </TouchableOpacity>
|
|
|
+
|
|
|
+ <TouchableOpacity
|
|
|
+ onPress={() => {
|
|
|
+ // route.params?.isTravelsScreen || route.params?.isProfileScreen
|
|
|
+ // ? navigation.dispatch(
|
|
|
+ // CommonActions.reset({
|
|
|
+ // index: 1,
|
|
|
+ // routes: [
|
|
|
+ // {
|
|
|
+ // name: NAVIGATION_PAGES.IN_APP_MAP_TAB,
|
|
|
+ // state: {
|
|
|
+ // routes: [
|
|
|
+ // {
|
|
|
+ // name: NAVIGATION_PAGES.MAP_TAB,
|
|
|
+ // params: { id: regionId, type: type === 'nm' ? 'regions' : 'places' }
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // })
|
|
|
+ // )
|
|
|
+ // : navigation.goBack();
|
|
|
+ }}
|
|
|
+ style={styles.goToMapBtn}
|
|
|
+ >
|
|
|
+ <View style={styles.chevronWrapper}>
|
|
|
+ <MapSvg fill={Colors.WHITE} />
|
|
|
+ </View>
|
|
|
+ </TouchableOpacity>
|
|
|
+
|
|
|
+ <View style={styles.wrapper}>
|
|
|
+ <View style={styles.nameContainer}>
|
|
|
+ <Text style={styles.title}>Meeting in San Clemente</Text>
|
|
|
+ <View style={[ButtonStyles.btnContainer, { gap: 2, flex: 0 }]}>
|
|
|
+ <TouchableOpacity
|
|
|
+ style={[ButtonStyles.btn, ButtonStyles.markVisitedButton]}
|
|
|
+ onPress={() => {}}
|
|
|
+ >
|
|
|
+ <Text style={[ButtonStyles.markVisitedText, { fontFamily: 'redhat-700' }]}>
|
|
|
+ JOIN
|
|
|
+ </Text>
|
|
|
+ </TouchableOpacity>
|
|
|
+
|
|
|
+ <TouchableOpacity
|
|
|
+ onPress={() => {}}
|
|
|
+ style={{
|
|
|
+ alignItems: 'center',
|
|
|
+ justifyContent: 'center',
|
|
|
+ padding: 8,
|
|
|
+ paddingRight: 0
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <ShareIcon
|
|
|
+ width={20}
|
|
|
+ height={20}
|
|
|
+ fill={Colors.DARK_BLUE}
|
|
|
+ style={{ alignSelf: 'center' }}
|
|
|
+ />
|
|
|
+ </TouchableOpacity>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+
|
|
|
+ <View style={styles.divider} />
|
|
|
+
|
|
|
+ <View style={styles.stats}>
|
|
|
+ {true ? (
|
|
|
+ <View style={{ gap: 8, flex: 1 }}>
|
|
|
+ <Text style={[styles.travelSeriesTitle, { fontSize: 12 }]}>Host</Text>
|
|
|
+ <TouchableOpacity
|
|
|
+ style={[styles.statItem, { justifyContent: 'flex-start' }]}
|
|
|
+ onPress={() =>
|
|
|
+ navigation.navigate(
|
|
|
+ ...([
|
|
|
+ NAVIGATION_PAGES.USERS_LIST,
|
|
|
+ {
|
|
|
+ id: 720,
|
|
|
+ isFromHere: true,
|
|
|
+ type: 'nm'
|
|
|
+ }
|
|
|
+ ] as never)
|
|
|
+ )
|
|
|
+ }
|
|
|
+ >
|
|
|
+ <View style={styles.userImageContainer}>
|
|
|
+ <Image
|
|
|
+ source={{ uri: API_HOST }}
|
|
|
+ style={[styles.userImage, { marginLeft: 0 }]}
|
|
|
+ />
|
|
|
+ <View style={{ justifyContent: 'space-between' }}>
|
|
|
+ <Text
|
|
|
+ style={{
|
|
|
+ fontFamily: 'montserrat-700',
|
|
|
+ fontSize: 12,
|
|
|
+ color: Colors.DARK_BLUE
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ Harry Mitsidis
|
|
|
+ </Text>
|
|
|
+ <Text style={{ fontWeight: '600', fontSize: 12, color: Colors.DARK_BLUE }}>
|
|
|
+ NM: <Text style={{ fontFamily: 'montserrat-700' }}>1284</Text> / UN:{' '}
|
|
|
+ <Text style={{ fontFamily: 'montserrat-700' }}>193</Text>
|
|
|
+ </Text>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+ </TouchableOpacity>
|
|
|
+ </View>
|
|
|
+ ) : (
|
|
|
+ <View style={[styles.statItem, { justifyContent: 'flex-start' }]} />
|
|
|
+ )}
|
|
|
+
|
|
|
+ {true ? (
|
|
|
+ <View style={{ gap: 8, flex: 1 }}>
|
|
|
+ <Text style={[styles.travelSeriesTitle, { fontSize: 12 }]}>Participants</Text>
|
|
|
+
|
|
|
+ <TouchableOpacity
|
|
|
+ style={[styles.statItem, { justifyContent: 'flex-end' }]}
|
|
|
+ onPress={() =>
|
|
|
+ navigation.navigate(
|
|
|
+ ...([
|
|
|
+ NAVIGATION_PAGES.USERS_LIST,
|
|
|
+ {
|
|
|
+ id: 720,
|
|
|
+ isFromHere: false,
|
|
|
+ type: 'nm'
|
|
|
+ }
|
|
|
+ ] as never)
|
|
|
+ )
|
|
|
+ }
|
|
|
+ >
|
|
|
+ <View style={styles.userImageContainer}>
|
|
|
+ {/* {data?.data.users_who_visited_region &&
|
|
|
+ data?.data.users_who_visited_region.length > 0 &&
|
|
|
+ data?.data.users_who_visited_region?.map((user, index) => (
|
|
|
+ <Image
|
|
|
+ key={index}
|
|
|
+ source={{ uri: API_HOST + user }}
|
|
|
+ style={[styles.userImage]}
|
|
|
+ />
|
|
|
+ ))} */}
|
|
|
+ <View style={styles.userCountContainer}>
|
|
|
+ <Text style={styles.userCount}>
|
|
|
+ {/* {formatNumber(data?.data.users_who_visited_region_count ?? 0)} */}
|
|
|
+ </Text>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+ </TouchableOpacity>
|
|
|
+ </View>
|
|
|
+ ) : (
|
|
|
+ <View style={[styles.statItem, { justifyContent: 'flex-end' }]} />
|
|
|
+ )}
|
|
|
+ </View>
|
|
|
+
|
|
|
+ <View style={[styles.divider]} />
|
|
|
+
|
|
|
+ <View style={{ gap: 16 }}>
|
|
|
+ <Text style={styles.travelSeriesTitle}>Details</Text>
|
|
|
+ <Text style={{ fontWeight: '600', fontSize: 13, color: Colors.DARK_BLUE }}>
|
|
|
+ Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum
|
|
|
+ has been the industry's standard dummy text ever since the 1500s, when an unknown
|
|
|
+ printer took a galley of type and scrambled it to make a type specimen book. It has
|
|
|
+ survived not only five centuries, but also the leap into electronic typesetting,
|
|
|
+ remaining essentially unchanged. It was popularised in the 1960s with the release of
|
|
|
+ Letraset sheets containing Lorem Ipsum passages, and more recently with desktop
|
|
|
+ publishing software like Aldus PageMaker including versions of Lorem Ipsum.
|
|
|
+ </Text>
|
|
|
+ </View>
|
|
|
+
|
|
|
+ <View style={{ gap: 16 }}>
|
|
|
+ <Text style={styles.travelSeriesTitle}>Photos</Text>
|
|
|
+ </View>
|
|
|
+
|
|
|
+ <View style={{ gap: 16 }}>
|
|
|
+ <Text style={styles.travelSeriesTitle}>Attachments</Text>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+ </ScrollView>
|
|
|
+ </View>
|
|
|
+ );
|
|
|
+};
|
|
|
+
|
|
|
+export default EventsScreen;
|