feat(frontend): add workspace to ctx

This commit is contained in:
Ruben Fiszel
2023-04-05 19:31:12 +02:00
parent 0b4da1a97c
commit 8f7a11b896
3 changed files with 5 additions and 4 deletions
@@ -70,7 +70,8 @@
email: $userStore?.email,
username: $userStore?.username,
query: Object.fromEntries($page.url.searchParams.entries()),
hash: $page.url.hash
hash: $page.url.hash,
workspace: $workspaceStore
}
const worldStore = buildWorld(context)
@@ -73,7 +73,7 @@
allIdsInPath
})
let ncontext = context
let ncontext: any = { ...context, workspace }
function hashchange(e: HashChangeEvent) {
ncontext.hash = e.newURL.split('#')[1]
@@ -98,7 +98,7 @@
<div class="relative">
<div
class="{$$props.class} {lockedClasses} h-full
class="{$$props.class} {lockedClasses} h-full
w-full {app.fullscreen ? '' : 'max-w-6xl'} mx-auto"
>
{#if $appStore.grid}
@@ -160,7 +160,7 @@
isEditor={false}
context={{
username: $userStore?.username ?? 'anonymous',
email: $userStore?.email ?? 'anonymous'
email: $userStore?.email ?? 'anonymous',
}}
summary={appViewerApp?.app.summary ?? ''}
noBackend