Remove profile step from old onboarding (#3989)

zio/stable
Eric Bailey 2024-05-13 13:15:38 -05:00 committed by GitHub
parent 8e1541e0a5
commit 10919319bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 18 deletions

View File

@ -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)

View File

@ -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) {