| 1234567891011121314151617181920212223242526272829 |
- import React, { useEffect } from "react";
- import PropTypes from "prop-types";
- import MarketPlace from "../../components/MarketPlace/MarketPlace";
- import { useDispatch, useSelector } from "react-redux";
- import { selectAllProfiles } from "../../store/selectors/profileSelectors";
- import { fetchAllProfiles } from "../../store/actions/profile/profileActions";
-
- const AdminUsersPage = () => {
- const dispatch = useDispatch();
- const allUsers = useSelector(selectAllProfiles);
- useEffect(() => {
- dispatch(fetchAllProfiles());
- }, []);
-
- return (
- <MarketPlace
- isAdmin
- myOffers
- users
- allUsers={Array.isArray(allUsers) ? allUsers : []}
- />
- );
- };
-
- AdminUsersPage.propTypes = {
- children: PropTypes.node,
- };
-
- export default AdminUsersPage;
|