Remove profile step from old onboarding (#3989)

This commit is contained in:
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 () => { (async () => {
if (!gate('reduced_onboarding_and_home_algo')) return
const {imageUri, imageMime} = profileStepResults const {imageUri, imageMime} = profileStepResults
if (imageUri && imageMime) { if (imageUri && imageMime) {
const blobPromise = uploadBlob(getAgent(), imageUri, imageMime) const blobPromise = uploadBlob(getAgent(), imageUri, imageMime)

View file

@ -89,7 +89,7 @@ export type ApiResponseMap = {
export const initialState: OnboardingState = { export const initialState: OnboardingState = {
hasPrev: false, hasPrev: false,
totalSteps: 8, totalSteps: 7,
activeStep: 'interests', activeStep: 'interests',
activeStepIndex: 1, activeStepIndex: 1,
@ -178,11 +178,8 @@ export function reducer(
next.activeStep = 'moderation' next.activeStep = 'moderation'
next.activeStepIndex = 6 next.activeStepIndex = 6
} else if (s.activeStep === 'moderation') { } else if (s.activeStep === 'moderation') {
next.activeStep = 'profile'
next.activeStepIndex = 7
} else if (s.activeStep === 'profile') {
next.activeStep = 'finished' next.activeStep = 'finished'
next.activeStepIndex = 8 next.activeStepIndex = 7
} }
break break
} }
@ -202,12 +199,9 @@ export function reducer(
} else if (s.activeStep === 'moderation') { } else if (s.activeStep === 'moderation') {
next.activeStep = 'topicalFeeds' next.activeStep = 'topicalFeeds'
next.activeStepIndex = 5 next.activeStepIndex = 5
} else if (s.activeStep === 'profile') { } else if (s.activeStep === 'finished') {
next.activeStep = 'moderation' next.activeStep = 'moderation'
next.activeStepIndex = 6 next.activeStepIndex = 6
} else if (s.activeStep === 'finished') {
next.activeStep = 'profile'
next.activeStepIndex = 7
} }
break break
} }
@ -242,14 +236,6 @@ export function reducer(
} }
break break
} }
case 'setProfileStepResults': {
next.profileStepResults = {
image: a.image,
imageUri: a.imageUri,
imageMime: a.imageMime,
}
break
}
} }
const state = { const state = {
@ -267,7 +253,6 @@ export function reducer(
suggestedAccountsStepResults: state.suggestedAccountsStepResults, suggestedAccountsStepResults: state.suggestedAccountsStepResults,
algoFeedsStepResults: state.algoFeedsStepResults, algoFeedsStepResults: state.algoFeedsStepResults,
topicalFeedsStepResults: state.topicalFeedsStepResults, topicalFeedsStepResults: state.topicalFeedsStepResults,
profileStepResults: state.profileStepResults,
}) })
if (s.activeStep !== state.activeStep) { if (s.activeStep !== state.activeStep) {