grub/client/App.tsx

14 lines
270 B
TypeScript
Raw Normal View History

2023-08-10 21:10:48 +00:00
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()}`;
}
2023-08-10 22:55:32 +00:00
return <Room roomId={roomId} />;
2023-08-10 21:10:48 +00:00
}