2021-12-14 16:58:19 +01:00
|
|
|
import { writable } from "svelte/store"
|
2022-01-24 15:32:27 +01:00
|
|
|
import { API } from "api"
|
2021-12-14 16:58:19 +01:00
|
|
|
|
|
|
|
export function templatesStore() {
|
|
|
|
const { subscribe, set } = writable([])
|
|
|
|
|
|
|
|
return {
|
|
|
|
subscribe,
|
2022-01-24 15:32:27 +01:00
|
|
|
load: async () => {
|
|
|
|
const templates = await API.getAppTemplates()
|
|
|
|
set(templates)
|
|
|
|
},
|
2021-12-14 16:58:19 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export const templates = templatesStore()
|