Skip to content

Instantly share code, notes, and snippets.

@percybolmer
Created August 9, 2021 06:09
Show Gist options
  • Save percybolmer/f9fbd1511855d1507d3c66e66a37bb81 to your computer and use it in GitHub Desktop.
Save percybolmer/f9fbd1511855d1507d3c66e66a37bb81 to your computer and use it in GitHub Desktop.
import Navbar from '../components/navbar/navbar'
import { Switch, Route } from "react-router-dom";
import Home from '../components/home/home'
import Contact from '../components/contact/contact'
import About from '../components/about/about'
import Profile from '../components/user/profile'
function Main() {
return (
<div>
<Navbar></Navbar>
<div className="content">
<Switch>
<Route exact path="/" component={Home}/>
<Route path="/contact" component={Contact}/>
<Route path="/about" component={About}/>
<Route path="/profile/:username" component={Profile}/>
</Switch>
</div>
</div>
)
}
export default Main;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment