2023-04-26 13:05:51 -07:00
|
|
|
import { writable, get } from 'svelte/store';
|
2023-04-24 12:05:11 -07:00
|
|
|
|
2023-04-25 08:49:00 -07:00
|
|
|
|
2023-04-26 13:05:51 -07:00
|
|
|
export let views = writable();
|
2023-04-25 08:49:00 -07:00
|
|
|
export let currentView = writable();
|
2023-05-01 13:27:28 -07:00
|
|
|
export let previousView = writable();
|
2023-04-24 12:05:11 -07:00
|
|
|
|
|
|
|
export function navigate(viewName) {
|
2023-04-26 13:05:51 -07:00
|
|
|
let v = get(views)[`./views/${viewName}.svelte`].default;
|
|
|
|
currentView.set(v)
|
2023-04-25 22:10:14 -07:00
|
|
|
}
|