router.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  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 CategoryStaffInfo from './container/CategoryStaffInfo'
  10. import SearchStaffs from './container/SearchStaff'
  11. import SearchStaffsInfo from './container/SearchStaffsInfo'
  12. import AddNewStaff from './container/AddNewStaff'
  13. import AddNewCategory from './container/AddNewCategory'
  14. export default () => (
  15. <div>
  16. <Switch>
  17. <Route path="/" exact component={MainPage} />
  18. <Route path="/authorisation" exact component={RenderAuthorisation} />
  19. <Route path="/auth" exact component= {RenderAuthorisation}/>
  20. <Route path="/registration" exact component={RenderRegistration} />
  21. <Route path="/category/staff/:id" exact component={CategoryStaffInfo} />
  22. <Route path="/staff/:id" exact component={MainPageStaffInfo} />
  23. <Route path="/search/:title" exact component={SearchStaffs} />
  24. <Route path="/search/Staff/:id" exact component={SearchStaffsInfo} />
  25. <Route path="/newStaff" exact component={AddNewStaff} />
  26. <Route path="/addCategory" exact component={AddNewCategory} />
  27. </Switch>
  28. </div>
  29. );