Skip to content

Commit 56b3887

Browse files
author
WebDeveloperGuide
committed
Routing added for Home, Products and About
Featured Product, Product Listing and Product Detail functionality added About us, Not Found page added
1 parent 03dd33d commit 56b3887

19 files changed

+460
-86
lines changed

web_panel/package-lock.json

Lines changed: 146 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web_panel/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@
66
"@testing-library/jest-dom": "^5.16.2",
77
"@testing-library/react": "^12.1.4",
88
"@testing-library/user-event": "^13.5.0",
9+
"axios": "^0.26.1",
910
"i": "^0.3.7",
1011
"npm": "^8.5.4",
1112
"react": "^17.0.2",
1213
"react-dom": "^17.0.2",
14+
"react-redux": "^7.2.6",
1315
"react-router-dom": "^5.3.0",
1416
"react-scripts": "5.0.0",
1517
"react-slick": "^0.28.1",
18+
"react-toastify": "^8.2.0",
19+
"redux": "^4.1.2",
1620
"slick-carousel": "^1.8.1",
1721
"styled-components": "^5.3.3",
1822
"web-vitals": "^2.1.4"

web_panel/src/App.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
import Home from './pages/Home';
2+
import ProductsPage from './pages/ProductsPage';
3+
import ProductDetailPage from './pages/ProductDetailPage';
4+
import About from './pages/About';
5+
import NotFound from './pages/NotFound';
6+
import { BrowserRouter as Router, Switch, Route } from "react-router-dom";
7+
28

39
function App() {
410
return (
511
<>
6-
<Home/>
12+
<Router>
13+
<Switch>
14+
<Route path="/" component={Home} exact/>
15+
<Route path="/products" component={ProductsPage}/>
16+
<Route path="/product/:id" component={ProductDetailPage}/>
17+
<Route path="/about" component={About}/>
18+
<Route path="*" component={NotFound} />
19+
</Switch>
20+
</Router>
721
</>
822
);
923
}

0 commit comments

Comments
 (0)