Created
August 7, 2021 12:57
-
-
Save percybolmer/7c7742992816cd40ca384913c424ae2f to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Navbar from '../components/navbar/navbar' | |
import { HashRouter, 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> | |
<HashRouter> | |
<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> | |
</HashRouter> | |
</div> | |
) | |
} | |
export default Main; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment