Merge branch 'frontend-core-ts-2' of github.com:Budibase/budibase into ts-portal-admin-store
This commit is contained in:
commit
ce3a479590
|
@ -2,13 +2,13 @@ import { writable } from "svelte/store"
|
|||
|
||||
type GotoFuncType = (path: string) => void
|
||||
|
||||
interface Store {
|
||||
interface PortalNavigationStore {
|
||||
initialisated: boolean
|
||||
goto: GotoFuncType
|
||||
}
|
||||
|
||||
export function createNavigationStore() {
|
||||
const store = writable<Store>({
|
||||
const store = writable<PortalNavigationStore>({
|
||||
initialisated: false,
|
||||
goto: undefined as any,
|
||||
})
|
||||
|
|
|
@ -1,17 +1,13 @@
|
|||
import { writable } from "svelte/store"
|
||||
import { PluginSource } from "constants/index"
|
||||
|
||||
import { Plugin } from "@budibase/types"
|
||||
import { API } from "api"
|
||||
|
||||
interface Plugin {
|
||||
_id: string
|
||||
}
|
||||
|
||||
export function createPluginsStore() {
|
||||
const { subscribe, set, update } = writable<Plugin[]>([])
|
||||
|
||||
async function load() {
|
||||
const plugins = await API.getPlugins()
|
||||
const plugins = (await API.getPlugins()) as Plugin[]
|
||||
set(plugins)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue