|
@@ -36,6 +36,7 @@ import UN150Icon from '../../../../assets/icons/un-150.svg';
|
|
|
import ChevronIcon from '../../../../assets/icons/chevron-left.svg';
|
|
|
import ShareIcon from '../../../../assets/icons/share.svg';
|
|
|
import UnverifiedIcon from '../../../../assets/icons/unverified.svg';
|
|
|
+import CommentsIcon from '../../../../assets/icons/messages/comments.svg';
|
|
|
|
|
|
import { ProfileStyles, ScoreStyles, TBTStyles } from '../TravellersScreen/Components/styles';
|
|
|
import UnauthenticatedProfileScreen from './UnauthenticatedProfileScreen';
|
|
@@ -192,6 +193,39 @@ const ProfileScreen: FC<Props> = ({ navigation, route }) => {
|
|
|
);
|
|
|
};
|
|
|
|
|
|
+ const handleGoToChat = () => {
|
|
|
+ navigation.dispatch(
|
|
|
+ CommonActions.reset({
|
|
|
+ index: 1,
|
|
|
+ routes: [
|
|
|
+ {
|
|
|
+ name: 'DrawerApp',
|
|
|
+ state: {
|
|
|
+ routes: [
|
|
|
+ {
|
|
|
+ name: NAVIGATION_PAGES.IN_APP_MESSAGES_TAB,
|
|
|
+ state: {
|
|
|
+ routes: [
|
|
|
+ { name: NAVIGATION_PAGES.CHATS_LIST },
|
|
|
+ {
|
|
|
+ name: NAVIGATION_PAGES.CHAT,
|
|
|
+ params: {
|
|
|
+ id: route.params?.userId,
|
|
|
+ name: data.user_data.first_name + ' ' + data.user_data.last_name,
|
|
|
+ avatar: data.user_data.avatar
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ })
|
|
|
+ );
|
|
|
+ };
|
|
|
+
|
|
|
return (
|
|
|
<PageWrapper>
|
|
|
<Header label="Profile" />
|
|
@@ -327,7 +361,16 @@ const ProfileScreen: FC<Props> = ({ navigation, route }) => {
|
|
|
/>
|
|
|
</TouchableOpacity>
|
|
|
</>
|
|
|
- ) : null}
|
|
|
+ ) : (
|
|
|
+ <TouchableOpacity style={styles.settings} onPress={handleGoToChat}>
|
|
|
+ <CommentsIcon
|
|
|
+ width={20}
|
|
|
+ height={20}
|
|
|
+ fill={Colors.DARK_BLUE}
|
|
|
+ style={{ alignSelf: 'center' }}
|
|
|
+ />
|
|
|
+ </TouchableOpacity>
|
|
|
+ )}
|
|
|
</View>
|
|
|
|
|
|
{hasActiveLinks() && (
|