aboutsummaryrefslogtreecommitdiff
path: root/src/screens/onboarding
diff options
context:
space:
mode:
Diffstat (limited to 'src/screens/onboarding')
-rw-r--r--src/screens/onboarding/CategorySelection.tsx20
-rw-r--r--src/screens/onboarding/SocialMedia.tsx1
2 files changed, 12 insertions, 9 deletions
diff --git a/src/screens/onboarding/CategorySelection.tsx b/src/screens/onboarding/CategorySelection.tsx
index 540b106f..5589ea9e 100644
--- a/src/screens/onboarding/CategorySelection.tsx
+++ b/src/screens/onboarding/CategorySelection.tsx
@@ -17,7 +17,10 @@ import {Background, MomentCategory} from '../../components';
import {MOMENT_CATEGORIES} from '../../constants';
import {OnboardingStackParams} from '../../routes';
import {fcmService, postMomentCategories} from '../../services';
-import {updateMomentCategories} from '../../store/actions/momentCategories';
+import {
+ updateMomentCategories,
+ updateIsOnboardedUser,
+} from '../../store/actions/';
import {RootState} from '../../store/rootReducer';
import {BackgroundGradientType, CategorySelectionScreenType} from '../../types';
import {getTokenOrLogout, SCREEN_WIDTH, userLogin} from '../../utils';
@@ -94,13 +97,8 @@ const CategorySelection: React.FC<CategorySelectionProps> = ({
popupProps: {
messageHeader: 'Category And Moments',
messageBody:
- 'Use pictures and videos to share different aspects of you',
- next: {
- messageHeader: 'Select Categories',
- messageBody:
- 'Select at least a category to begin creating moments!',
- next: undefined,
- },
+ 'Use pictures and videos to share \ndifferent aspects of you',
+ next: undefined,
},
});
}
@@ -166,13 +164,17 @@ const CategorySelection: React.FC<CategorySelectionProps> = ({
}
try {
if (isOnBoarding) {
+ dispatch(updateIsOnboardedUser(true));
const token = await getTokenOrLogout(dispatch);
await postMomentCategories(selectedCategories, token);
userLogin(dispatch, {userId: userId, username: username});
fcmService.sendFcmTokenToServer();
} else {
dispatch(
- updateMomentCategories(momentCategories.concat(selectedCategories)),
+ updateMomentCategories(
+ momentCategories.concat(selectedCategories),
+ true,
+ ),
);
navigation.goBack();
}
diff --git a/src/screens/onboarding/SocialMedia.tsx b/src/screens/onboarding/SocialMedia.tsx
index 32beb4bc..2a978f94 100644
--- a/src/screens/onboarding/SocialMedia.tsx
+++ b/src/screens/onboarding/SocialMedia.tsx
@@ -67,6 +67,7 @@ const SocialMedia: React.FC<SocialMediaProps> = ({route, navigation}) => {
navigation.navigate('CategorySelection', {
screenType: CategorySelectionScreenType.Onboarding,
user: {userId: userId, username: username},
+ newCustomCategory: undefined,
});
};