grub/client/App.tsx

18 lines
306 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()}`;
}
return (
<>
Hellosu, <Room roomId={roomId} />
</>
);
}