Profile step only in v2
This commit is contained in:
@@ -76,25 +76,25 @@ export function StepFinished() {
|
|||||||
})(),
|
})(),
|
||||||
])
|
])
|
||||||
|
|
||||||
await getAgent().upsertProfile(async existing => {
|
|
||||||
existing = existing ?? {}
|
|
||||||
|
|
||||||
if (profileStepResults.imageUri && profileStepResults.imageMime) {
|
|
||||||
const res = await uploadBlob(
|
|
||||||
getAgent(),
|
|
||||||
profileStepResults.imageUri,
|
|
||||||
profileStepResults.imageMime,
|
|
||||||
)
|
|
||||||
|
|
||||||
if (res.data.blob) {
|
|
||||||
existing.avatar = res.data.blob
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return existing
|
|
||||||
})
|
|
||||||
|
|
||||||
if (isV2Enabled) {
|
if (isV2Enabled) {
|
||||||
|
await getAgent().upsertProfile(async existing => {
|
||||||
|
existing = existing ?? {}
|
||||||
|
|
||||||
|
if (profileStepResults.imageUri && profileStepResults.imageMime) {
|
||||||
|
const res = await uploadBlob(
|
||||||
|
getAgent(),
|
||||||
|
profileStepResults.imageUri,
|
||||||
|
profileStepResults.imageMime,
|
||||||
|
)
|
||||||
|
|
||||||
|
if (res.data.blob) {
|
||||||
|
existing.avatar = res.data.blob
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return existing
|
||||||
|
})
|
||||||
|
|
||||||
await getAgent().setHomeAlgoPref({
|
await getAgent().setHomeAlgoPref({
|
||||||
enabled: true,
|
enabled: true,
|
||||||
uri: DISCOVER_FEED_URI,
|
uri: DISCOVER_FEED_URI,
|
||||||
|
|||||||
@@ -80,7 +80,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,
|
||||||
|
|
||||||
@@ -198,11 +198,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
|
||||||
}
|
}
|
||||||
@@ -222,12 +219,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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user