mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-17 16:55:54 +01:00
18 lines
493 B
JavaScript
18 lines
493 B
JavaScript
|
import React from 'react';
|
||
|
import {BrowserRouter, Switch, Route} from 'react-router-dom';
|
||
|
import Customers from './components/customers';
|
||
|
import Customer from './components/customer';
|
||
|
|
||
|
const Routers =()=>(
|
||
|
|
||
|
<BrowserRouter>
|
||
|
<Switch>
|
||
|
<Route exact path='/' component={Customers} />
|
||
|
<Route path='/customer/:id' component={Customer} />
|
||
|
<Route path='/customer' component={Customer} />
|
||
|
</Switch>
|
||
|
</BrowserRouter>
|
||
|
|
||
|
)
|
||
|
|
||
|
export default Routers;
|