summaryrefslogtreecommitdiffhomepage
path: root/packages/desktop/src/entry.tsx
blob: 82c5dd331373353bb82d83ad4f02ec3ef1d17b7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// @refresh reload
import { render } from "solid-js/web"
import { DesktopInterface } from "@/DesktopInterface"
import { Platform, PlatformProvider } from "@/PlatformContext"

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?",
  )
}

const platform: Platform = {}

render(
  () => (
    <PlatformProvider value={platform}>
      <DesktopInterface />
    </PlatformProvider>
  ),
  root!,
)