From 3745cf6b465ff5e8b30ba370187613dff07a446a Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 10 Aug 2022 12:04:58 +0100 Subject: [PATCH] Add PoC of using a custom component inside client library --- packages/client/src/components/ClientApp.svelte | 10 ++++++++++ packages/client/src/index.js | 6 ++++++ .../controllers/static/templates/BudibaseApp.svelte | 5 +++++ 3 files changed, 21 insertions(+) diff --git a/packages/client/src/components/ClientApp.svelte b/packages/client/src/components/ClientApp.svelte index 64b1712b89..c883dd4206 100644 --- a/packages/client/src/components/ClientApp.svelte +++ b/packages/client/src/components/ClientApp.svelte @@ -85,8 +85,18 @@ builderStore.actions.notifyLoaded() } }) + + // TODO: remove. this is a test to render the first custom component + console.log(window["##BUDIBASE_CUSTOM_COMPONENTS##"]?.[0]) + const custom = window["##BUDIBASE_CUSTOM_COMPONENTS##"]?.[0]?.Component +{#if custom} +
+ +
+{/if} + {#if dataLoaded}
+ + +