import React, { useMemo } from 'react'; import PropTypes from 'prop-types'; import { useI18nContext } from '../../../hooks/useI18nContext'; export default function PermissionsConnectPermissionList({ permissions }) { const t = useI18nContext(); const PERMISSION_TYPES = useMemo(() => { return { eth_accounts: { leftIcon: 'fas fa-eye', label: t('eth_accounts'), rightIcon: null, }, }; }, [t]); return (
{Object.keys(permissions).map((permission) => (
{PERMISSION_TYPES[permission].label}
))}
); } PermissionsConnectPermissionList.propTypes = { permissions: PropTypes.objectOf(PropTypes.bool).isRequired, };