Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

AdminButtons.js 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import React from "react";
  2. import PropTypes from "prop-types";
  3. import AdminButton from "./AdminButton/AdminButton";
  4. import {
  5. CategoryIcon,
  6. DollarIcon,
  7. LocationIcon,
  8. UserIcon,
  9. } from "./AdminButtons.styled";
  10. import {
  11. ADMIN_CATEGORIES_PAGE,
  12. ADMIN_LOCATIONS_PAGE,
  13. ADMIN_PAYMENT_PAGE,
  14. ADMIN_USERS_PAGE,
  15. } from "../../../../../constants/pages";
  16. import { useTranslation } from "react-i18next";
  17. const AdminButtons = (props) => {
  18. const { t } = useTranslation();
  19. return (
  20. <>
  21. <AdminButton
  22. toggleDrawer={props.toggleDrawer}
  23. icon={<UserIcon />}
  24. title={t("admin.navigation.users")}
  25. route={ADMIN_USERS_PAGE}
  26. />
  27. <AdminButton
  28. toggleDrawer={props.toggleDrawer}
  29. icon={<CategoryIcon />}
  30. title={t("admin.navigation.categories")}
  31. route={ADMIN_CATEGORIES_PAGE}
  32. />
  33. <AdminButton
  34. toggleDrawer={props.toggleDrawer}
  35. icon={<LocationIcon />}
  36. title={t("admin.navigation.locations")}
  37. route={ADMIN_LOCATIONS_PAGE}
  38. />
  39. <AdminButton
  40. toggleDrawer={props.toggleDrawer}
  41. icon={<DollarIcon />}
  42. title={t("admin.navigation.payment")}
  43. route={ADMIN_PAYMENT_PAGE}
  44. />
  45. </>
  46. );
  47. };
  48. AdminButtons.propTypes = {
  49. children: PropTypes.node,
  50. toggleDrawer: PropTypes.func,
  51. };
  52. export default AdminButtons;