grub/client/App.tsx
2023-08-10 16:10:48 -05:00

17 lines
306 B
TypeScript

import { v4 } from "uuid";
import Room from "./Room";
export default function App() {
const x = new URL(window.location.href);
const roomId = x.pathname.replace(/^\//, "");
if (!roomId) {
location.href = `/${v4()}`;
}
return (
<>
Hellosu, <Room roomId={roomId} />
</>
);
}