Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from 'react';
- import {BrowserRouter, Route, Switch} from 'react-router-dom';
- import App from './App'
- //import Table from './Table'
- import NotFound from './NotFound'
- import TablePage from "./TablePage";
- import SidebarLeftPush from "./SideBarLeftPush";
- import Nav from "./Nav"
- import { I18nextProvider } from "react-i18next";
- import i18n from "./i18n";
- const Router = () => (
- <I18nextProvider i18n={i18n}>
- <BrowserRouter>
- <div>
- <Nav/>
- <SidebarLeftPush>
- <Switch>
- <Route exact path="/" component={App} />
- {/*<Route path="/machine" component={TablePage} tableType="machine"/>*/}
- {/*<Route path="/customer" component={TablePage} tableType="customer"/>*/}
- {/*<Route path="/user" component={TablePage} tableType="user"/>*/}
- {/*<Route path="/software" component={TablePage} tableType="software"/>*/}
- <Route path="/machine" render={()=><TablePage num="2" tableType="Machine"/>}/>
- <Route path="/customer" render={()=><TablePage num="2" tableType="Customer"/>}/>
- <Route path="/user" render={()=><TablePage num="2" tableType="User"/>}/>
- <Route path="/software" render={()=><TablePage num="2" tableType="Software"/>}/>
- {/*<Route path="/customer" component={TablePage} tableType="customer"/>*/}
- {/*<Route path="/user" component={TablePage} tableType="user"/>*/}
- {/*<Route path="/software" component={TablePage} tableType="software"/>*/}
- <Route component={NotFound} />
- </Switch>
- </SidebarLeftPush>
- </div>
- </BrowserRouter>
- </I18nextProvider>
- );
- export default Router;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement