import * as JSX from "./jsx";
import Home from "./home";
import Blog from "./blog";
import Pkgs from "./pkg";

JSX.addRoute( "/", () => <Home /> );
JSX.addRoute( "/blog", () => <Blog /> );
JSX.addRoute( "/blog/*", () => <Blog /> );
JSX.addRoute( "/pkg", () => <Pkgs /> );
JSX.addRoute( "/pkg/*", () => <Pkgs /> );

window.onpopstate = JSX.onPopState;

const url = new URL( window.location.href );
JSX.navigateParams( url.pathname, url.searchParams.entries() );
