mirror of
https://github.com/aljazceru/opencode.git
synced 2026-01-16 22:35:02 +01:00
25 lines
558 B
TypeScript
25 lines
558 B
TypeScript
/* @refresh reload */
|
|
import { render } from "solid-js/web"
|
|
import { Router, Route } from "@solidjs/router"
|
|
|
|
import "./index.css"
|
|
import App from "./App"
|
|
|
|
const root = document.getElementById("root")
|
|
|
|
if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
|
|
throw new Error(
|
|
"Root element not found. Did you forget to add it to your index.html? Or maybe the id attribute got misspelled?",
|
|
)
|
|
}
|
|
|
|
render(
|
|
() => (
|
|
<Router>
|
|
<Route path="/share/:id" component={App} />
|
|
<Route path="/" component={App} />
|
|
</Router>
|
|
),
|
|
root!,
|
|
)
|