11 lines
241 B
JavaScript
11 lines
241 B
JavaScript
import { writable, get } from 'svelte/store';
|
|
|
|
|
|
export let views = writable();
|
|
export let currentView = writable();
|
|
|
|
export function navigate(viewName) {
|
|
let v = get(views)[`./views/${viewName}.svelte`].default;
|
|
currentView.set(v)
|
|
}
|