nandi/oripublic Fork 0
2434cc7fb724f02b34c0189dfd5fb30c1a8a68e3
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 · 19 lines · 480 BTypeScript Blame HistoryRaw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { App } from "./App";
import { dispatch } from "./store";
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>,
);