backend & types
This commit is contained in:
22
frontend/src/App.svelte
Normal file
22
frontend/src/App.svelte
Normal file
@@ -0,0 +1,22 @@
|
||||
<script lang="ts">
|
||||
import { location } from "./lib/store"
|
||||
|
||||
export let url = ""
|
||||
|
||||
if (url) {
|
||||
// ssr
|
||||
let l = url.split("?")
|
||||
$location = {
|
||||
path: l[0],
|
||||
search: l.length > 1 ? l[1] : "",
|
||||
hash: "",
|
||||
categoryPath: l[0].replace(/\/[^_\/]+_[^\/]+$/, ""),
|
||||
push: false,
|
||||
pop: false,
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof window !== "undefined") console.log("App initialized")
|
||||
</script>
|
||||
|
||||
<h1>Hello World</h1>
|
||||
Reference in New Issue
Block a user