2020-11-13 16:42:32 +01:00
|
|
|
<script>
|
|
|
|
import { onMount } from "svelte"
|
|
|
|
import { componentStore } from "../store"
|
|
|
|
import Component from "./Component.svelte"
|
|
|
|
|
|
|
|
let frontendDefinition
|
|
|
|
let loaded = false
|
2020-11-17 13:08:24 +01:00
|
|
|
$: pageDefinition = frontendDefinition?.page?.props
|
2020-11-13 16:42:32 +01:00
|
|
|
|
|
|
|
onMount(async () => {
|
|
|
|
frontendDefinition = window["##BUDIBASE_FRONTEND_DEFINITION##"]
|
|
|
|
await componentStore.actions.loadComponentLibrary()
|
|
|
|
loaded = true
|
|
|
|
console.log(frontendDefinition)
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
|
|
|
|
{#if loaded}
|
2020-11-17 13:08:24 +01:00
|
|
|
<Component definition={pageDefinition} />
|
2020-11-13 16:42:32 +01:00
|
|
|
{/if}
|