2020-11-13 16:42:32 +01:00
|
|
|
<script>
|
2020-11-18 20:18:18 +01:00
|
|
|
import { setContext } from "svelte"
|
2020-11-13 16:42:32 +01:00
|
|
|
import Component from "./Component.svelte"
|
2020-11-18 20:18:18 +01:00
|
|
|
import SDK from "../sdk"
|
2020-11-13 16:42:32 +01:00
|
|
|
|
2020-11-18 20:18:18 +01:00
|
|
|
// Provide SDK for components
|
|
|
|
setContext("app", SDK)
|
2020-11-13 16:42:32 +01:00
|
|
|
|
2020-11-18 20:18:18 +01:00
|
|
|
const frontendDefinition = window["##BUDIBASE_FRONTEND_DEFINITION##"]
|
|
|
|
$: pageDefinition = frontendDefinition?.page?.props
|
|
|
|
$: console.log(frontendDefinition)
|
2020-11-13 16:42:32 +01:00
|
|
|
</script>
|
|
|
|
|
2020-11-18 20:18:18 +01:00
|
|
|
<Component definition={pageDefinition} />
|