aboutsummaryrefslogtreecommitdiff
path: root/src/components/profile
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-03-26 19:53:32 -0400
committerGitHub <noreply@github.com>2021-03-26 19:53:32 -0400
commitbef5728b24a71d1bf327a72e425346020a997037 (patch)
treedeabc8fa1f5bd2fd983a6dc7784379498b194fb2 /src/components/profile
parent641a084bb6172b801349067dff0490525d0effea (diff)
parentfca7886b673211ed566d7d5bb96ee5e594e8005a (diff)
Merge pull request #331 from IvanIFChen/tma728-select-school-onboarding
[TMA-728] Select university during onboarding
Diffstat (limited to 'src/components/profile')
-rw-r--r--src/components/profile/ProfileMoreInfoDrawer.tsx8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/components/profile/ProfileMoreInfoDrawer.tsx b/src/components/profile/ProfileMoreInfoDrawer.tsx
index 2fec5cca..a77a2e84 100644
--- a/src/components/profile/ProfileMoreInfoDrawer.tsx
+++ b/src/components/profile/ProfileMoreInfoDrawer.tsx
@@ -24,11 +24,9 @@ const ProfileMoreInfoDrawer: React.FC<ProfileMoreInfoDrawerProps> = (props) => {
const {setIsOpen, userXId, isBlocked, handleBlockUnblock, userXName} = props;
const {
user: {userId, username},
- } = useSelector((state: RootState) => state.user);
+ profile,
+ } = useSelector((state: RootState) => state?.user);
const isOwnProfile = !userXId || userXName === username;
- const {suggested_people_linked} = useSelector(
- (state: RootState) => state.user.profile,
- );
const goToEditProfile = () => {
navigation.push('EditProfile', {
@@ -39,7 +37,7 @@ const ProfileMoreInfoDrawer: React.FC<ProfileMoreInfoDrawerProps> = (props) => {
};
const goToUpdateSPProfile = () => {
- if (suggested_people_linked === 0) {
+ if (profile.suggested_people_linked === 0) {
Alert.alert(ERROR_ATTEMPT_EDIT_SP);
} else {
// Sending undefined for updatedSelectedBadges to mark that there was no update yet