nandi/oripublic Fork 0
00224b167266e7d496672adfe1e60fcffeab7e63
Commits
Clone
git clone https://git.rickub.com/nandi/ori.git
git clone ssh://git@rickub.com/nandi/ori.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

forked from bots-garden/ori

main.tsx · 22 lines · 645 BTypeScript Blame HistoryRaw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { App } from "./App";
import { dispatch } from "./store";
// Imported for its side effect: stamps the remembered theme on <html>
// before the first render, so the page does not flash the default palette.
import "./theme";
import { connectSocket, wsUrl } from "./ws";
import "./app.css";

const root = document.getElementById("root");
if (!root) {
	throw new Error("index.html must contain a #root element");
}

const socket = connectSocket({ url: wsUrl(), dispatch });

createRoot(root).render(
	<StrictMode>
		<App socket={socket} />
	</StrictMode>,
);