entry.tsx 581 B

12345678910111213141516171819202122
  1. // @refresh reload
  2. import { render } from "solid-js/web"
  3. import { DesktopInterface } from "@/DesktopInterface"
  4. import { Platform, PlatformProvider } from "@/PlatformContext"
  5. const root = document.getElementById("root")
  6. if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
  7. throw new Error(
  8. "Root element not found. Did you forget to add it to your index.html? Or maybe the id attribute got misspelled?",
  9. )
  10. }
  11. const platform: Platform = {}
  12. render(
  13. () => (
  14. <PlatformProvider value={platform}>
  15. <DesktopInterface />
  16. </PlatformProvider>
  17. ),
  18. root!,
  19. )