forked from Ayushparikh-code/Web-dev-mini-projects
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
31 lines (27 loc) · 881 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
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import Customers from './Customers'
import { BrowserRouter as Router, Switch, Route, Redirect} from 'react-router-dom';
class App extends Component {
render() {
console.log("Host URL"+process.env.PUBLIC_URL);
return (
<Router basename={process.env.PUBLIC_URL}>
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h1 className="App-title">Simple React App</h1>
</header>
<Switch>
<Route exact path= "/" render={() => (
<Redirect to="/customerlist"/>
)}/>
<Route exact path='/customerlist' component={Customers} />
</Switch>
</div>
</Router>
);
}
}
export default App;