- {#each new Array(10) as _}
-
- {/each}
+
+
+
+
+
+ (layout = "grid")}
+ selected={layout === "grid"}
+ quiet
+ icon="ClassicGridView"
+ />
+ (layout = "table")}
+ selected={layout === "table"}
+ quiet
+ icon="ViewRow"
+ />
+
+ {#if layout === "grid"}
+
+ {:else}
+ Table
+ {/if}
diff --git a/packages/builder/src/stores/portal/apps.js b/packages/builder/src/stores/portal/apps.js
new file mode 100644
index 0000000000..aefbb5a411
--- /dev/null
+++ b/packages/builder/src/stores/portal/apps.js
@@ -0,0 +1,27 @@
+import { writable } from "svelte/store"
+import { get } from "builderStore/api"
+
+export function createAppStore() {
+ const store = writable([])
+
+ async function load() {
+ try {
+ const res = await get("/api/applications")
+ const json = await res.json()
+ if (res.ok && Array.isArray(json)) {
+ store.set(json)
+ } else {
+ store.set([])
+ }
+ } catch (error) {
+ store.set([])
+ }
+ }
+
+ return {
+ subscribe: store.subscribe,
+ load,
+ }
+}
+
+export const apps = createAppStore()
diff --git a/packages/builder/src/stores/portal/index.js b/packages/builder/src/stores/portal/index.js
index 5aba1c2731..5aca4c2502 100644
--- a/packages/builder/src/stores/portal/index.js
+++ b/packages/builder/src/stores/portal/index.js
@@ -1,2 +1,3 @@
export { organisation } from "./organisation"
export { admin } from "./admin"
+export { apps } from "./apps"