import React from 'react'; import PropTypes from 'prop-types'; import { usePermissionDescriptions } from '../../../hooks/usePermissionDescriptions'; export default function PermissionsConnectPermissionList({ permissions }) { const getPermissionDescription = usePermissionDescriptions(); return (
{Object.keys(permissions).map((permission) => { const { label, leftIcon, rightIcon } = getPermissionDescription( permission, ); return (
{label} {rightIcon && }
); })}
); } PermissionsConnectPermissionList.propTypes = { permissions: PropTypes.object.isRequired, };