Created
June 25, 2021 22:47
-
-
Save MoranggNormal/cfe9a6577a1305068ba8a0a7624b7d4d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AuthContextProvider } from "./contexts/AuthContext"; | |
import { BrowserRouter, Route, Switch } from "react-router-dom"; | |
import Home from "./pages/Home"; | |
import NewRoom from "./pages/NewRoom"; | |
import Room from "./pages/Room" | |
function App() { | |
return ( | |
<AuthContextProvider> | |
<BrowserRouter> | |
<Switch> | |
<Route path="/" exact component={Home} /> | |
<Route path="/rooms/new" exact component={NewRoom} /> | |
<Route path="/rooms/:id" component={Room} /> | |
</Switch> | |
</BrowserRouter> | |
</AuthContextProvider> | |
); | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment