diff --git a/packages/builder/src/api.js b/packages/builder/src/api.js
index f3db05307a..37894d9bbc 100644
--- a/packages/builder/src/api.js
+++ b/packages/builder/src/api.js
@@ -5,12 +5,12 @@ import {
} from "@budibase/frontend-core"
import { store } from "./builderStore"
import { get } from "svelte/store"
-import { auth, overview } from "./stores/portal"
+import { auth } from "./stores/portal"
export const API = createAPIClient({
attachHeaders: headers => {
// Attach app ID header from store
- let appId = get(store).appId || get(overview).selectedAppId
+ let appId = get(store).appId
if (appId) {
headers["x-budibase-app-id"] = appId
}
diff --git a/packages/builder/src/pages/builder/portal/overview/[appId]/_layout.svelte b/packages/builder/src/pages/builder/portal/overview/[appId]/_layout.svelte
index 56d76d3a4c..806589e421 100644
--- a/packages/builder/src/pages/builder/portal/overview/[appId]/_layout.svelte
+++ b/packages/builder/src/pages/builder/portal/overview/[appId]/_layout.svelte
@@ -47,6 +47,7 @@
let deletionModal
let exportPublishedVersion = false
let deletionConfirmationAppName
+ let loaded = false
$: app = $overview.selectedApp
$: appId = $overview.selectedAppId
@@ -56,10 +57,12 @@
$: lockedByYou = $auth.user.email === app?.lockedBy?.email
const initialiseApp = async appId => {
+ loaded = false
try {
const pkg = await API.fetchAppPackage(appId)
await store.actions.initialise(pkg)
await API.syncApp(appId)
+ loaded = true
} catch (error) {
notifications.error("Error initialising app overview")
$goto("../../")
@@ -111,10 +114,6 @@
onDestroy(() => {
stopSyncing()
store.actions.reset()
- overview.update(state => ({
- ...state,
- selectedAppId: null,
- }))
})
@@ -232,7 +231,9 @@
active={$isActive("./version")}
/>
-
+ {#if loaded}
+
+ {/if}