This repository was archived by the owner on Mar 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathApp.js
More file actions
55 lines (44 loc) · 1.62 KB
/
App.js
File metadata and controls
55 lines (44 loc) · 1.62 KB
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
45
46
47
48
49
50
51
52
53
54
55
import React from 'react';
import { NavLink, Routes, Route } from 'react-router-dom';
import './App.css';
import Customers from './components/customers/customer.js'
import Stores from './components/stores/store.js'
import Products from './components/products/product.js'
import Login from './components/login/login.js'
import PrivateRoutes from './components/privateRoutes/PrivateRoutes.js'
const App = () => (
<div className='app'>
<h1>E-Commerce System</h1>
<Navigation />
<Main />
</div>
);
const Navigation = () => (
<nav>
<ul>
<li><NavLink exact activeClassName="current" to='/'>Login</NavLink></li>
<li><NavLink exact activeClassName="current" to='/customer'>customer</NavLink></li>
<li><NavLink exact activeClassName="current" to='/store'>Store</NavLink></li>
<li><NavLink exact activeClassName="current" to='/product'>Product</NavLink></li>
</ul>
</nav>
);
const Contact = () => (
<div className='contact'>
<h1>Contact Me</h1>
<p>You can reach me via email: <strong>[email protected]</strong></p>
</div>
);
const Main = () => (
<Routes>
// <Route exact path='/' element={<Home/>}></Route>
// <Route exact path='/customer' element={<Customers/>}></Route>
{/*<Route exact path='/store' element={<Contact/>}></Route>*/}
<Route exact path='/store' element={<Stores/>}></Route>
<Route exact path='/product' element={<Products/>}></Route>
<Route exact path='/' element={<Login/>}></Route>
<Route exact path='/customer' element={ <Customers/>}></Route>
// <Route exact path='/store' element={<Contact/>}></Route>
</Routes>
);
export default App;