Skip to content

Commit

Permalink
Remove profile step from old onboarding (#3989)
Browse files Browse the repository at this point in the history
  • Loading branch information
estrattonbailey authored May 13, 2024
1 parent 8e1541e commit 1091931
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
2 changes: 2 additions & 0 deletions src/screens/Onboarding/StepFinished.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
21 changes: 3 additions & 18 deletions src/screens/Onboarding/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export type ApiResponseMap = {

export const initialState: OnboardingState = {
hasPrev: false,
totalSteps: 8,
totalSteps: 7,
activeStep: 'interests',
activeStepIndex: 1,

Expand Down Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down Expand Up @@ -242,14 +236,6 @@ export function reducer(
}
break
}
case 'setProfileStepResults': {
next.profileStepResults = {
image: a.image,
imageUri: a.imageUri,
imageMime: a.imageMime,
}
break
}
}

const state = {
Expand All @@ -267,7 +253,6 @@ export function reducer(
suggestedAccountsStepResults: state.suggestedAccountsStepResults,
algoFeedsStepResults: state.algoFeedsStepResults,
topicalFeedsStepResults: state.topicalFeedsStepResults,
profileStepResults: state.profileStepResults,
})

if (s.activeStep !== state.activeStep) {
Expand Down

0 comments on commit 1091931

Please sign in to comment.