1// oxlint-disable import/no-unassigned-import
2/* @refresh reload */
3import "solid-devtools";
4import "./index.css";
5
6import { render } from "solid-js/web";
7
8import { Router } from "@solidjs/router";
9import App from "./app";
10import { routes } from "./routes";
11
12const root = document.getElementById("root");
13
14if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
15 throw new Error(
16 "Root element not found. Did you forget to add it to your index.html? Or maybe the id attribute got misspelled?",
17 );
18}
19
20render(
21 () => <Router root={(props) => <App>{props.children}</App>}>{routes}</Router>,
22 root,
23);