mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
fix(onboarding): skip default step if no notifiers and storages exist when advancing from storage step
This commit is contained in:
@@ -68,8 +68,16 @@ export const onboardingSteps: OnboardingStep[] = [
|
||||
id: "storage",
|
||||
component: StepStorage,
|
||||
isSkippable: true,
|
||||
skipToStep: "defaults",
|
||||
nextStep: "defaults",
|
||||
skipToStep: (ctx: any) => {
|
||||
const notifiers = (ctx.flowData?.notifiers as unknown[]) || [];
|
||||
const storages = (ctx.flowData?.storages as unknown[]) || [];
|
||||
return notifiers.length === 0 && storages.length === 0 ? "agent-create" : "defaults";
|
||||
},
|
||||
nextStep: (ctx: any) => {
|
||||
const notifiers = (ctx.flowData?.notifiers as unknown[]) || [];
|
||||
const storages = (ctx.flowData?.storages as unknown[]) || [];
|
||||
return notifiers.length === 0 && storages.length === 0 ? "agent-create" : "defaults";
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "defaults",
|
||||
|
||||
Reference in New Issue
Block a user