Last active
February 10, 2022 21:49
-
-
Save techomoro/32e2f5d954df7b7fbeefccab8636c1be 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 React from "react"; | |
import ReactDOM from "react-dom"; | |
import "./index.css"; | |
import * as serviceWorker from "./serviceWorker"; | |
import { BrowserRouter as Router, Route, Routes } from "react-router-dom"; | |
import { | |
Navigation, | |
Footer, | |
Home, | |
About, | |
Contact, | |
Blog, | |
Posts, | |
Post, | |
} from "./components"; | |
ReactDOM.render( | |
<Router> | |
<Navigation /> | |
<Routes> | |
<Route path="/" element={<Home />} /> | |
<Route path="/about" element={<About />} /> | |
<Route path="/contact" element={<Contact />} /> | |
<Route path="/blog" element={<Blog />}> | |
<Route path="" element={<Posts />} /> | |
<Route path=":postSlug" element={<Post />} /> | |
</Route> | |
</Routes> | |
<Footer /> | |
</Router>, | |
document.getElementById("root") | |
); | |
serviceWorker.unregister(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment