-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
44 lines (41 loc) · 905 Bytes
/
App.js
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* import Product from "./Pages/Product";
import Home from "./Pages/Home";
import ProductList from "./Pages/ProductList";
import Register from "./Pages/Register";
import Login from "./Pages/Login";
import Cart from "./Pages/Cart";
import {
BrowserRouter as Router,
Switch,
Route,
Redirect,
} from "react-router-dom";
*/
import {
BrowserRouter as Router, Route, Switch
} from "react-router-dom";
import Cart from "./Pages/Cart";
import Home from "./Pages/Home";
import Product from "./Pages/Product";
import ProductList from "./Pages/ProductList";
function App() {
return (
<Router>
<Switch>
<Route exact path="/">
<Home />
</Route>
<Route path="/products/:category">
<ProductList />
</Route>
<Route path="/product/:id">
<Product />
</Route>
<Route path="/cart">
<Cart />
</Route>
</Switch>
</Router>
);
}
export default App;