diff options
author | Eric Bailey <git@esb.lol> | 2024-05-13 13:15:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-13 13:15:38 -0500 |
commit | 10919319bf6fba26e12d14025dac5f08f7b95939 (patch) | |
tree | f60436b5a8b09b2c4bc0a0f636b59809e4fc9bfa /src | |
parent | 8e1541e0a5eedb67b5a53e297b4734167b8dcb6e (diff) | |
download | voidsky-10919319bf6fba26e12d14025dac5f08f7b95939.tar.zst |
Remove profile step from old onboarding (#3989)
Diffstat (limited to 'src')
-rw-r--r-- | src/screens/Onboarding/StepFinished.tsx | 2 | ||||
-rw-r--r-- | src/screens/Onboarding/state.ts | 21 |
2 files changed, 5 insertions, 18 deletions
diff --git a/src/screens/Onboarding/StepFinished.tsx b/src/screens/Onboarding/StepFinished.tsx index 51793777e..0acb0093a 100644 --- a/src/screens/Onboarding/StepFinished.tsx +++ b/src/screens/Onboarding/StepFinished.tsx @@ -120,6 +120,8 @@ export function StepFinished() { })(), (async () => { + if (!gate('reduced_onboarding_and_home_algo')) return + const {imageUri, imageMime} = profileStepResults if (imageUri && imageMime) { const blobPromise = uploadBlob(getAgent(), imageUri, imageMime) diff --git a/src/screens/Onboarding/state.ts b/src/screens/Onboarding/state.ts index 3031dfbf4..c08603587 100644 --- a/src/screens/Onboarding/state.ts +++ b/src/screens/Onboarding/state.ts @@ -89,7 +89,7 @@ export type ApiResponseMap = { export const initialState: OnboardingState = { hasPrev: false, - totalSteps: 8, + totalSteps: 7, activeStep: 'interests', activeStepIndex: 1, @@ -178,11 +178,8 @@ export function reducer( next.activeStep = 'moderation' next.activeStepIndex = 6 } else if (s.activeStep === 'moderation') { - next.activeStep = 'profile' - next.activeStepIndex = 7 - } else if (s.activeStep === 'profile') { next.activeStep = 'finished' - next.activeStepIndex = 8 + next.activeStepIndex = 7 } break } @@ -202,12 +199,9 @@ export function reducer( } else if (s.activeStep === 'moderation') { next.activeStep = 'topicalFeeds' next.activeStepIndex = 5 - } else if (s.activeStep === 'profile') { + } else if (s.activeStep === 'finished') { next.activeStep = 'moderation' next.activeStepIndex = 6 - } else if (s.activeStep === 'finished') { - next.activeStep = 'profile' - next.activeStepIndex = 7 } break } @@ -242,14 +236,6 @@ export function reducer( } break } - case 'setProfileStepResults': { - next.profileStepResults = { - image: a.image, - imageUri: a.imageUri, - imageMime: a.imageMime, - } - break - } } const state = { @@ -267,7 +253,6 @@ export function reducer( suggestedAccountsStepResults: state.suggestedAccountsStepResults, algoFeedsStepResults: state.algoFeedsStepResults, topicalFeedsStepResults: state.topicalFeedsStepResults, - profileStepResults: state.profileStepResults, }) if (s.activeStep !== state.activeStep) { |