mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
fix(onboarding): skip default step when going back from agent-create if no notifiers and storages exist
This commit is contained in:
@@ -50,6 +50,12 @@ export const OnboardingShell = () => {
|
||||
let prevId = STEP_ORDER[currentIndex - 1];
|
||||
if (currentStepId === "project-create") {
|
||||
prevId = "agent-create";
|
||||
} else if (currentStepId === "agent-create") {
|
||||
const notifiers = (state.context.flowData.notifiers as unknown[]) || [];
|
||||
const storages = (state.context.flowData.storages as unknown[]) || [];
|
||||
if (notifiers.length === 0 && storages.length === 0) {
|
||||
prevId = "storage";
|
||||
}
|
||||
}
|
||||
if (prevId) goToStep(prevId);
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user