|
@@ -1047,25 +1047,94 @@ const EventScreen = ({ route }: { route: any }) => {
|
|
|
</TouchableOpacity>
|
|
|
)}
|
|
|
|
|
|
- {event.settings.registrations_info !== 1 && event.type !== 4 && (
|
|
|
- <View style={{ flexDirection: 'row', alignItems: 'center', gap: 4, flex: 1 }}>
|
|
|
- <NomadsIcon fill={Colors.DARK_BLUE} height={20} width={20} />
|
|
|
- <Text
|
|
|
- style={{
|
|
|
- fontSize: getFontSize(12),
|
|
|
- fontWeight: '600',
|
|
|
- color: Colors.DARK_BLUE,
|
|
|
- flex: 1
|
|
|
- }}
|
|
|
- >
|
|
|
- {renderSpotsText(event)}
|
|
|
- </Text>
|
|
|
- </View>
|
|
|
- )}
|
|
|
+ {
|
|
|
+ // event.settings.registrations_info !== 1 && event.type === 1 ? (
|
|
|
+ // <View style={{ flexDirection: 'row', alignItems: 'center', gap: 4, flex: 1 }}>
|
|
|
+ // <NomadsIcon fill={Colors.DARK_BLUE} height={20} width={20} />
|
|
|
+ // <Text
|
|
|
+ // style={{
|
|
|
+ // fontSize: getFontSize(12),
|
|
|
+ // fontWeight: '600',
|
|
|
+ // color: Colors.DARK_BLUE,
|
|
|
+ // flex: 1
|
|
|
+ // }}
|
|
|
+ // >
|
|
|
+ // {renderSpotsText(event)}
|
|
|
+ // </Text>
|
|
|
+ // </View>
|
|
|
+ // ) :
|
|
|
+ (event.settings.host_data && event.type !== 1 && event.type !== 4) ||
|
|
|
+ (event.settings.host_data && event.type === 4 && event.settings.address2) ? (
|
|
|
+ <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.PUBLIC_PROFILE_VIEW,
|
|
|
+ {
|
|
|
+ userId: event.settings.host_profile
|
|
|
+ }
|
|
|
+ ] as never)
|
|
|
+ )
|
|
|
+ }
|
|
|
+ disabled={!event.settings.host_profile}
|
|
|
+ >
|
|
|
+ <View style={styles.userImageContainer}>
|
|
|
+ {event.settings.host_data.avatar ? (
|
|
|
+ <Image
|
|
|
+ source={{
|
|
|
+ uri: API_HOST + '/img/avatars/' + event.settings.host_data.avatar
|
|
|
+ }}
|
|
|
+ style={[styles.userImage, { marginLeft: 0 }]}
|
|
|
+ />
|
|
|
+ ) : (
|
|
|
+ <AvatarWithInitials
|
|
|
+ text={
|
|
|
+ event.settings.host_data.first_name[0] +
|
|
|
+ event.settings.host_data.last_name[0]
|
|
|
+ }
|
|
|
+ flag={API_HOST + event.settings.host_data?.flag}
|
|
|
+ size={28}
|
|
|
+ fontSize={12}
|
|
|
+ borderColor={Colors.DARK_LIGHT}
|
|
|
+ borderWidth={1}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+
|
|
|
+ <View style={{ justifyContent: 'space-between' }}>
|
|
|
+ <Text
|
|
|
+ style={{
|
|
|
+ fontFamily: 'montserrat-700',
|
|
|
+ fontSize: 12,
|
|
|
+ color: Colors.DARK_BLUE
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {event.settings.host_data.first_name}
|
|
|
+ </Text>
|
|
|
+ <Text
|
|
|
+ style={{
|
|
|
+ fontFamily: 'montserrat-700',
|
|
|
+ fontSize: 12,
|
|
|
+ color: Colors.DARK_BLUE
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {event.settings.host_data.last_name}
|
|
|
+ </Text>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+ </TouchableOpacity>
|
|
|
+ </View>
|
|
|
+ ) : (
|
|
|
+ <View style={[styles.statItem, { justifyContent: 'flex-end' }]} />
|
|
|
+ )
|
|
|
+ }
|
|
|
</View>
|
|
|
|
|
|
<View style={styles.stats}>
|
|
|
- {event.settings.host_data ? (
|
|
|
+ {event.settings.host_data &&
|
|
|
+ (event.type === 1 || (event.type === 4 && !event.settings.address2)) ? (
|
|
|
<View style={{ gap: 8, flex: 1 }}>
|
|
|
<Text style={[styles.travelSeriesTitle, { fontSize: 12 }]}>Host</Text>
|
|
|
<TouchableOpacity
|
|
@@ -1127,13 +1196,11 @@ const EventScreen = ({ route }: { route: any }) => {
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
</View>
|
|
|
- ) : (
|
|
|
- <View style={[styles.statItem, { justifyContent: 'flex-start' }]} />
|
|
|
- )}
|
|
|
+ ) : null}
|
|
|
|
|
|
- {(filteredParticipants.length > 0 && event.type !== 4) ||
|
|
|
+ {(filteredParticipants.length > 0 && event.type === 1) ||
|
|
|
(filteredInterested.length === 0 &&
|
|
|
- event.type === 4 &&
|
|
|
+ event.type !== 1 &&
|
|
|
filteredParticipants.length > 0) ? (
|
|
|
<View style={{ gap: 8, flex: 1 }}>
|
|
|
<Text style={[styles.travelSeriesTitle, { fontSize: 12 }]}>
|
|
@@ -1223,7 +1290,7 @@ const EventScreen = ({ route }: { route: any }) => {
|
|
|
) : null}
|
|
|
|
|
|
{filteredParticipants.length === 0 &&
|
|
|
- event.type === 4 &&
|
|
|
+ event.type !== 1 &&
|
|
|
filteredInterested.length > 0 ? (
|
|
|
<View style={{ gap: 8, flex: 1 }}>
|
|
|
<Text style={[styles.travelSeriesTitle, { fontSize: 12 }]}>
|
|
@@ -1310,10 +1377,10 @@ const EventScreen = ({ route }: { route: any }) => {
|
|
|
</View>
|
|
|
) : null}
|
|
|
</View>
|
|
|
-
|
|
|
+
|
|
|
{filteredInterested.length > 0 &&
|
|
|
filteredParticipants.length > 0 &&
|
|
|
- event.type === 4 && (
|
|
|
+ event.type !== 1 && (
|
|
|
<View style={styles.stats}>
|
|
|
{filteredInterested.length > 0 ? (
|
|
|
<View style={{ gap: 8, flex: 1 }}>
|