From 9693f20043c8f1c586d363fa1b0aa04dd524596d Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 1 Aug 2022 15:52:01 +0100 Subject: [PATCH] Fix add component button in empty screens --- .../design/[screenId]/_components/AppPreview.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte index 304d41ad19..e430c0d1a4 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte @@ -20,7 +20,7 @@ } from "@budibase/bbui" import ErrorSVG from "@budibase/frontend-core/assets/error.svg?raw" import { findComponent, findComponentPath } from "builderStore/componentUtils" - import { isActive, goto } from "@roxi/routify" + import { isActive, goto, url } from "@roxi/routify" import { Screen } from "builderStore/store/screenTemplates/utils/Screen" let iframe @@ -186,7 +186,7 @@ $goto("./navigation") } } else if (type === "request-add-component") { - $goto("./components/new") + $goto(`./components/${$selectedComponent?._id}/new`) } else if (type === "highlight-setting") { store.actions.settings.highlight(data.setting)