1
0
Fork 0
mirror of synced 2024-07-02 04:50:44 +12:00

Add default budibase org details

This commit is contained in:
Andrew Kingston 2021-05-18 13:54:04 +01:00
parent 4f0f532b72
commit 6a418ecd51

View file

@ -1,15 +1,15 @@
import { writable, get } from "svelte/store"
import api from "builderStore/api"
const FALLBACK_CONFIG = {
const DEFAULT_CONFIG = {
platformUrl: "",
logoUrl: "",
logoUrl: "https://i.imgur.com/ZKyklgF.png",
docsUrl: "",
company: "http://localhost:10000",
company: "Budibase",
}
export function createOrganisationStore() {
const store = writable({})
const store = writable(DEFAULT_CONFIG)
const { subscribe, set } = store
async function init() {
@ -17,7 +17,7 @@ export function createOrganisationStore() {
const json = await res.json()
if (json.status === 400) {
set(FALLBACK_CONFIG)
set(DEFAULT_CONFIG)
} else {
set({ ...json.config, _rev: json._rev })
}