13 lines
270 B
TypeScript
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} />;
|
|
}
|