WIP
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onClick(e) {
|
function onClick(e) {
|
||||||
window.location = `/lists/${e}`;
|
window.history.pushState({}, "", `/lists/${e}`);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
8
ui/src/routes/Home.svelte
Normal file
8
ui/src/routes/Home.svelte
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<div>
|
||||||
|
Welcome to Packager, your helper for your next trip!
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
Reference in New Issue
Block a user