소스 검색

send button in profile

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

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.