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} />;
}
