This commit is contained in:
2021-09-06 18:11:51 +02:00
parent 296536d188
commit fdffe5fcdd
3 changed files with 11 additions and 2 deletions

View File

@@ -4,6 +4,7 @@
<script lang="ts"> <script lang="ts">
import PackageLists from "./routes/PackageLists.svelte"; import PackageLists from "./routes/PackageLists.svelte";
import Home from "./routes/Home.svelte";
$: { $: {
const path = window.location.pathname; const path = window.location.pathname;
@@ -12,7 +13,7 @@
let component; let component;
if (path == "/") { if (path == "/") {
window.location.replace("/lists/"); compontent = Home;
} else if (path == "/lists/") { } else if (path == "/lists/") {
console.log("Routing to package lists"); console.log("Routing to package lists");
component = PackageLists; component = PackageLists;

View File

@@ -26,7 +26,7 @@
} }
function onClick(e) { function onClick(e) {
window.location = `/lists/${e}`; window.history.pushState({}, "", `/lists/${e}`);
} }
</script> </script>

View File

@@ -0,0 +1,8 @@
<script lang="ts">
</script>
<main>
<div>
Welcome to Packager, your helper for your next trip!
</div>
</main>