fix(onboarding): skip default step if no notifiers and storages exist when advancing from storage step

This commit is contained in:
Théo LAGACHE
2026-06-19 14:18:41 +02:00
parent 37ed654dc9
commit 9d0a0f8529
+10 -2
View File
@@ -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",