Skip to content

Instantly share code, notes, and snippets.

@MoranggNormal
Created June 25, 2021 22:47
Show Gist options
  • Save MoranggNormal/cfe9a6577a1305068ba8a0a7624b7d4d to your computer and use it in GitHub Desktop.
Save MoranggNormal/cfe9a6577a1305068ba8a0a7624b7d4d to your computer and use it in GitHub Desktop.
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