Profile step only in v2

This commit is contained in:
Eric Bailey
2024-04-17 12:52:07 -05:00
parent e10a78604e
commit 7ca8182523
2 changed files with 21 additions and 27 deletions
+1 -1
View File
@@ -76,6 +76,7 @@ export function StepFinished() {
})(),
])
if (isV2Enabled) {
await getAgent().upsertProfile(async existing => {
existing = existing ?? {}
@@ -94,7 +95,6 @@ export function StepFinished() {
return existing
})
if (isV2Enabled) {
await getAgent().setHomeAlgoPref({
enabled: true,
uri: DISCOVER_FEED_URI,
+3 -9
View File
@@ -80,7 +80,7 @@ export type ApiResponseMap = {
export const initialState: OnboardingState = {
hasPrev: false,
totalSteps: 8,
totalSteps: 7,
activeStep: 'interests',
activeStepIndex: 1,
@@ -198,11 +198,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
}
@@ -222,12 +219,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
}