|
@@ -20,6 +20,7 @@ import WHSIcon from 'assets/icons/travels-section/whs.svg';
|
|
|
import ArrowIcon from 'assets/icons/next.svg';
|
|
|
import UNPIcon from 'assets/icons/travels-section/unp.svg';
|
|
|
import AuthIcon from 'assets/icons/authenticate-user.svg';
|
|
|
+import SendIcon from 'assets/icons/messages/send.svg';
|
|
|
|
|
|
import { styles } from './styles';
|
|
|
import { InfoItem } from './InfoItem';
|
|
@@ -58,6 +59,7 @@ type PersonalInfoProps = {
|
|
|
lastSeenFlag: string | null;
|
|
|
canBeAuthenticated: 0 | 1;
|
|
|
setCanBeAuthenticated: (value: 0 | 1) => void;
|
|
|
+ goToChat: () => void;
|
|
|
};
|
|
|
updates: {
|
|
|
un_visited: number;
|
|
@@ -248,7 +250,7 @@ export const PersonalInfo: FC<PersonalInfoProps> = ({
|
|
|
const maxAvatars = Math.floor(availableWidth / (AVATAR_SIZE - AVATAR_MARGIN)) - 2;
|
|
|
|
|
|
return (
|
|
|
- <>
|
|
|
+ <View>
|
|
|
<View style={styles.wrapper}>
|
|
|
<View style={styles.scoreContainer}>
|
|
|
{scores.map((score, index) => {
|
|
@@ -272,33 +274,42 @@ export const PersonalInfo: FC<PersonalInfoProps> = ({
|
|
|
})}
|
|
|
</View>
|
|
|
|
|
|
- {isPublicView && token ? (
|
|
|
- <View style={{ gap: 8, flexDirection: 'row', alignItems: 'flex-end' }}>
|
|
|
- <FriendStatus
|
|
|
- status={friendStatus}
|
|
|
- data={data}
|
|
|
- setModalInfo={setModalInfo}
|
|
|
- handleSendFriendRequest={handleSendFriendRequest}
|
|
|
- handleUpdateFriendStatus={handleUpdateFriendStatus}
|
|
|
- authButton={data.canBeAuthenticated}
|
|
|
- />
|
|
|
- {data.canBeAuthenticated ? (
|
|
|
- <TouchableOpacity
|
|
|
- onPress={() =>
|
|
|
- setModalInfo({
|
|
|
- isVisible: true,
|
|
|
- type: 'authenticate',
|
|
|
- message: `Please confirm that you have personally met ${data.firstName} ${data.lastName}.`,
|
|
|
- action: handleAuthenticate,
|
|
|
- title: ''
|
|
|
- })
|
|
|
- }
|
|
|
- style={styles.authBtn}
|
|
|
- >
|
|
|
- <AuthIcon />
|
|
|
- <Text style={styles.authText}>Authenticate</Text>
|
|
|
- </TouchableOpacity>
|
|
|
- ) : null}
|
|
|
+ {data.ownProfile === 0 && token ? (
|
|
|
+ <View style={{ gap: 8 }}>
|
|
|
+ <TouchableOpacity
|
|
|
+ style={[styles.authBtn, { backgroundColor: Colors.ORANGE }]}
|
|
|
+ onPress={data.goToChat}
|
|
|
+ >
|
|
|
+ <SendIcon fill={Colors.WHITE} height={15} />
|
|
|
+ <Text style={[styles.authText, { color: Colors.WHITE }]}>Send message</Text>
|
|
|
+ </TouchableOpacity>
|
|
|
+ <View style={{ gap: 8, flexDirection: 'row', alignItems: 'flex-end' }}>
|
|
|
+ <FriendStatus
|
|
|
+ status={friendStatus}
|
|
|
+ data={data}
|
|
|
+ setModalInfo={setModalInfo}
|
|
|
+ handleSendFriendRequest={handleSendFriendRequest}
|
|
|
+ handleUpdateFriendStatus={handleUpdateFriendStatus}
|
|
|
+ authButton={data.canBeAuthenticated}
|
|
|
+ />
|
|
|
+ {data.canBeAuthenticated ? (
|
|
|
+ <TouchableOpacity
|
|
|
+ onPress={() =>
|
|
|
+ setModalInfo({
|
|
|
+ isVisible: true,
|
|
|
+ type: 'authenticate',
|
|
|
+ message: `Please confirm that you have personally met ${data.firstName} ${data.lastName}.`,
|
|
|
+ action: handleAuthenticate,
|
|
|
+ title: ''
|
|
|
+ })
|
|
|
+ }
|
|
|
+ style={styles.authBtn}
|
|
|
+ >
|
|
|
+ <AuthIcon />
|
|
|
+ <Text style={styles.authText}>Authenticate</Text>
|
|
|
+ </TouchableOpacity>
|
|
|
+ ) : null}
|
|
|
+ </View>
|
|
|
</View>
|
|
|
) : null}
|
|
|
|
|
@@ -569,6 +580,6 @@ export const PersonalInfo: FC<PersonalInfoProps> = ({
|
|
|
onClose={() => setModalInfo({ ...modalInfo, isVisible: false })}
|
|
|
title=""
|
|
|
/>
|
|
|
- </>
|
|
|
+ </View>
|
|
|
);
|
|
|
};
|