aboutsummaryrefslogtreecommitdiff
path: root/src/components/profile/ProfilePreview.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@thetaggid.com>2021-02-26 21:44:19 -0500
committerGitHub <noreply@github.com>2021-02-26 21:44:19 -0500
commita71c78b9b3eb5e4f4e55bd166aff6b7859f70941 (patch)
treeabfbb6616e1c86a7897c143e8c98eace8aa21451 /src/components/profile/ProfilePreview.tsx
parentf70fce1db38e492ea7c18f268859792ef9433f40 (diff)
parent8e48253d51f10fde40af25868a45a4c1a2fa8265 (diff)
Merge pull request #267 from shravyaramesh/tma669-mf-drawer-visibility
[TMA-669] Suggested People: Dismiss mutual friends drawer after navigation
Diffstat (limited to 'src/components/profile/ProfilePreview.tsx')
-rw-r--r--src/components/profile/ProfilePreview.tsx7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/components/profile/ProfilePreview.tsx b/src/components/profile/ProfilePreview.tsx
index 02ab94e7..0021b1c6 100644
--- a/src/components/profile/ProfilePreview.tsx
+++ b/src/components/profile/ProfilePreview.tsx
@@ -37,12 +37,14 @@ interface ProfilePreviewProps extends ViewProps {
profilePreview: ProfilePreviewType;
previewType: PreviewType;
screenType: ScreenType;
+ setMFDrawer?: Function;
}
const ProfilePreview: React.FC<ProfilePreviewProps> = ({
profilePreview: {username, first_name, last_name, id, thumbnail_url},
previewType,
screenType,
+ setMFDrawer,
}) => {
const navigation = useNavigation();
const {user: loggedInUser} = useSelector((state: RootState) => state.user);
@@ -139,6 +141,11 @@ const ProfilePreview: React.FC<ProfilePreviewProps> = ({
);
}
+ // Close Mutual Friends drawer on suggested people upon navigation
+ if (setMFDrawer) {
+ setMFDrawer(false);
+ }
+
navigation.push('Profile', {
userXId,
screenType,