import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
import "./App.css";
import HomeGuestPage from "./pages/HomeGuestPage";
import HomeUserPage from "./pages/HomeUserPage";
import ProfilePage from "./pages/ProfilePage";
import RoomPage from "./pages/RoomPage";
import InfoUpdatePage from "./pages/InfoUpdatePage";
import InvitePage from "./pages/InvitePage";

function App() {
  return (
    <Router basename={process.env.PUBLIC_URL}>
      {/* <AuthProvider> */}
      <Switch>
        <Route exact path="/" component={HomeGuestPage} />
        <Route exact path="/user" component={HomeUserPage} />
        <Route path="/profile/:id/update" component={InfoUpdatePage} />
        <Route path="/profile/:id" component={ProfilePage} />
        <Route path="/room/:roomId/:channelId" component={RoomPage} />
        <Route path="/room/Invite" component={InvitePage} />
      </Switch>
      {/* </AuthProvider> */}
    </Router>
  );
}

export default App;
