|
@@ -90,7 +90,7 @@ export const PersonalInfo: FC<PersonalInfoProps> = ({
|
|
title: ''
|
|
title: ''
|
|
});
|
|
});
|
|
const [isUpdatesModalVisible, setIsUpdatesModalVisible] = useState(false);
|
|
const [isUpdatesModalVisible, setIsUpdatesModalVisible] = useState(false);
|
|
- const [updateType, setUpdateType] = useState<string>('un');
|
|
|
|
|
|
+ const [updateType, setUpdateType] = useState<string>('nm');
|
|
|
|
|
|
const { data: regions } = usePostGetProfileRegions(token as string, userId, type);
|
|
const { data: regions } = usePostGetProfileRegions(token as string, userId, type);
|
|
const { data: update } = usePostGetUpdateQuery(token as string, userId, updateType, true);
|
|
const { data: update } = usePostGetUpdateQuery(token as string, userId, updateType, true);
|
|
@@ -329,6 +329,22 @@ export const PersonalInfo: FC<PersonalInfoProps> = ({
|
|
{updates && hasUpdates() ? (
|
|
{updates && hasUpdates() ? (
|
|
<InfoItem title={'VISITED IN THE LAST 90 DAYS'}>
|
|
<InfoItem title={'VISITED IN THE LAST 90 DAYS'}>
|
|
<View style={{ flexDirection: 'row', flexWrap: 'wrap' }}>
|
|
<View style={{ flexDirection: 'row', flexWrap: 'wrap' }}>
|
|
|
|
+ {updates.nm_visited && updates.nm_visited > 0 ? (
|
|
|
|
+ <TouchableOpacity style={styles.updates} onPress={() => handleOpenUpdates('nm')}>
|
|
|
|
+ <RegionsIcon fill={Colors.DARK_BLUE} height={20} width={20} />
|
|
|
|
+ {updates.nm_new && updates.nm_new > 0 ? (
|
|
|
|
+ <View>
|
|
|
|
+ <Text style={styles.updatesText}>
|
|
|
|
+ {updates.nm_visited} (+{updates.nm_new} new)
|
|
|
|
+ </Text>
|
|
|
|
+ <Text style={styles.updatesText}>NM regions</Text>
|
|
|
|
+ </View>
|
|
|
|
+ ) : (
|
|
|
|
+ <Text style={styles.updatesText}>{updates.nm_visited} NM regions</Text>
|
|
|
|
+ )}
|
|
|
|
+ </TouchableOpacity>
|
|
|
|
+ ) : null}
|
|
|
|
+
|
|
{updates.un_visited && updates.un_visited > 0 ? (
|
|
{updates.un_visited && updates.un_visited > 0 ? (
|
|
<TouchableOpacity style={styles.updates} onPress={() => handleOpenUpdates('un')}>
|
|
<TouchableOpacity style={styles.updates} onPress={() => handleOpenUpdates('un')}>
|
|
<FlagsIcon fill={Colors.DARK_BLUE} height={20} width={20} />
|
|
<FlagsIcon fill={Colors.DARK_BLUE} height={20} width={20} />
|
|
@@ -361,22 +377,6 @@ export const PersonalInfo: FC<PersonalInfoProps> = ({
|
|
</TouchableOpacity>
|
|
</TouchableOpacity>
|
|
) : null}
|
|
) : null}
|
|
|
|
|
|
- {updates.nm_visited && updates.nm_visited > 0 ? (
|
|
|
|
- <TouchableOpacity style={styles.updates} onPress={() => handleOpenUpdates('nm')}>
|
|
|
|
- <RegionsIcon fill={Colors.DARK_BLUE} height={20} width={20} />
|
|
|
|
- {updates.nm_new && updates.nm_new > 0 ? (
|
|
|
|
- <View>
|
|
|
|
- <Text style={styles.updatesText}>
|
|
|
|
- {updates.nm_visited} (+{updates.nm_new} new)
|
|
|
|
- </Text>
|
|
|
|
- <Text style={styles.updatesText}>NM regions</Text>
|
|
|
|
- </View>
|
|
|
|
- ) : (
|
|
|
|
- <Text style={styles.updatesText}>{updates.nm_visited} NM regions</Text>
|
|
|
|
- )}
|
|
|
|
- </TouchableOpacity>
|
|
|
|
- ) : null}
|
|
|
|
-
|
|
|
|
{updates.new_dare && updates.new_dare > 0 ? (
|
|
{updates.new_dare && updates.new_dare > 0 ? (
|
|
<TouchableOpacity style={styles.updates} onPress={() => handleOpenUpdates('dare')}>
|
|
<TouchableOpacity style={styles.updates} onPress={() => handleOpenUpdates('dare')}>
|
|
<CompassIcon fill={Colors.DARK_BLUE} height={20} width={20} />
|
|
<CompassIcon fill={Colors.DARK_BLUE} height={20} width={20} />
|