grub/client/App.tsx
2023-08-10 17:55:32 -05:00

13 lines
270 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 <Room roomId={roomId} />;
}