<script lang="ts">
    import { location } from "./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>
