karl/view/src/App.svelte

15 lines
395 B
Svelte
Raw Normal View History

2021-03-09 01:13:42 +01:00
<script lang="ts">
2021-03-10 01:20:22 +01:00
import Editor from "./routes/editor.svelte";
2021-03-09 01:13:42 +01:00
import * as routes from "./routes";
import ToastWrapper from "./components/Toast/ToastWrapper.svelte";
import { route as currentRoute } from "./stores";
</script>
2021-03-10 01:20:22 +01:00
{#if $currentRoute.startsWith("editor")}
<Editor />
{:else if $currentRoute in routes}
<svelte:component this={routes[$currentRoute]} />
{/if}
2021-03-09 01:13:42 +01:00
2021-03-10 01:20:22 +01:00
<ToastWrapper />