router.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. import React from "react";
  2. import { Switch, Route } from "react-router-dom";
  3. import RenderRegistration from "./container/renderRegistration"
  4. import RenderAuthorisation from "./container/renderAuthorisation"
  5. import MainPage from "./container/MainPage";
  6. // import Form from './components/Auth/index'
  7. // import RegistrForm from './components/Auth/registration'
  8. import MainPageStaffInfo from './container/MainPageStaffInfo'
  9. import SearchStaffs from './container/SearchStaff'
  10. import SearchStaffsInfo from './container/SearchStaffsInfo'
  11. import AddNewStaff from './container/AddNewStaff'
  12. import AddNewCategory from './container/AddNewCategory'
  13. export default () => (
  14. <div>
  15. <Switch>
  16. <Route path="/" exact component={MainPage} />
  17. <Route path="/authorisation" exact component={RenderAuthorisation} />
  18. <Route path="/auth" exact component= {RenderAuthorisation}/>
  19. <Route path="/registration" exact component={RenderRegistration} />
  20. <Route path="/staff/:id" exact component={MainPageStaffInfo} />
  21. <Route path="/search/:title" exact component={SearchStaffs} />
  22. <Route path="/search/Staff/:id" exact component={SearchStaffsInfo} />
  23. <Route path="/newStaff" exact component={AddNewStaff} />
  24. <Route path="/addCategory" exact component={AddNewCategory} />
  25. </Switch>
  26. </div>
  27. );