import "bootstrap/dist/css/bootstrap.min.css";
import "./global.css";

import { v4 } from "uuid";
import Room from "./Room";
import { Container } from "react-bootstrap";

export default function App() {
  const x = new URL(window.location.href);
  const roomId = x.pathname.replace(/^\//, "");

  if (!roomId) {
    location.href = `/${v4()}`;
  }

  return (
    <Container>
      <Room roomId={roomId} />
    </Container>
  );
}
