Viktoriia пре 8 месеци
родитељ
комит
6aa9ce4d88
2 измењених фајлова са 46 додато и 1 уклоњено
  1. 2 0
      assets/icons/messages/comments.svg
  2. 44 1
      src/screens/InAppScreens/ProfileScreen/index.tsx

Разлика између датотеке није приказан због своје велике величине
+ 2 - 0
assets/icons/messages/comments.svg


+ 44 - 1
src/screens/InAppScreens/ProfileScreen/index.tsx

@@ -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() && (

Неке датотеке нису приказане због велике количине промена