move app state to store
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
<script>
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
import { currentView } from '../lib/routing.js';
|
||||
import { navigate } from '../lib/routing.js';
|
||||
|
||||
export let target = $currentView;
|
||||
export let target;
|
||||
export let hotkey = null;
|
||||
export let ctrl = false
|
||||
export let alt = false;
|
||||
@ -11,7 +11,7 @@
|
||||
|
||||
function click() {
|
||||
if (typeof target === 'string') {
|
||||
$currentView = target;
|
||||
navigate(target);
|
||||
}
|
||||
else if (typeof target === 'function') {
|
||||
target();
|
||||
|
Reference in New Issue
Block a user