mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
fix(onboarding): allow going from agent-create to project-create if a project already exists
This commit is contained in:
@@ -82,10 +82,15 @@ export const onboardingSteps: OnboardingStep[] = [
|
|||||||
id: "agent-create",
|
id: "agent-create",
|
||||||
component: StepAgentCreate,
|
component: StepAgentCreate,
|
||||||
isSkippable: true,
|
isSkippable: true,
|
||||||
skipToStep: "finish",
|
skipToStep: (ctx: any) => {
|
||||||
|
const hasProject = !!ctx.flowData?.project;
|
||||||
|
return hasProject ? "project-create" : "finish";
|
||||||
|
},
|
||||||
nextStep: (ctx: any) => {
|
nextStep: (ctx: any) => {
|
||||||
const agents = ctx.flowData?.agents as unknown[] | undefined;
|
const agents = ctx.flowData?.agents as unknown[] | undefined;
|
||||||
return agents && agents.length > 0 ? "agent-key" : "finish";
|
const hasProject = !!ctx.flowData?.project;
|
||||||
|
if (agents && agents.length > 0) return "agent-key";
|
||||||
|
return hasProject ? "project-create" : "finish";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user