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

AdminUsersPage.js 773B

1234567891011121314151617181920212223242526272829
  1. import React, { useEffect } from "react";
  2. import PropTypes from "prop-types";
  3. import MarketPlace from "../../components/MarketPlace/MarketPlace";
  4. import { useDispatch, useSelector } from "react-redux";
  5. import { selectAllProfiles } from "../../store/selectors/profileSelectors";
  6. import { fetchAllProfiles } from "../../store/actions/profile/profileActions";
  7. const AdminUsersPage = () => {
  8. const dispatch = useDispatch();
  9. const allUsers = useSelector(selectAllProfiles);
  10. useEffect(() => {
  11. dispatch(fetchAllProfiles());
  12. }, []);
  13. return (
  14. <MarketPlace
  15. isAdmin
  16. myOffers
  17. users
  18. allUsers={Array.isArray(allUsers) ? allUsers : []}
  19. />
  20. );
  21. };
  22. AdminUsersPage.propTypes = {
  23. children: PropTypes.node,
  24. };
  25. export default AdminUsersPage;