-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathRouter.js
More file actions
27 lines (24 loc) · 818 Bytes
/
Router.js
File metadata and controls
27 lines (24 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import React, { Component } from "react";
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import Home from "../Pages/Home";
import Contact from "../Pages/Contact";
import About from "../Pages/About";
import PageNotFound from "../Pages/PageNotFound";
import Navbar from "../Components/Layouts/Navbar";
class MainRouter extends Component {
render = () => {
return (
<Router>
<Navbar />
<Routes>
<Route path="/" exact element={<Home />} />
<Route path="/home" exact element={<Home />} />
<Route path="/about" exact element={<About />} />
<Route path="/contact" exact element={<Contact />} />
<Route path="*" element={<PageNotFound />} />
</Routes>
</Router>
);
};
}
export default MainRouter;