From 3d3f8fe81136ef9bb0da9553b20e4cf9cd362eda Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Fri, 31 Mar 2023 02:09:06 +0300 Subject: [PATCH] update --- .../user/profile/components/ContactOptions.js | 11 ++-- .../components/UserProfileCardContent.js | 58 ++++++++++--------- 2 files changed, 38 insertions(+), 31 deletions(-) diff --git a/src/features/user/profile/components/ContactOptions.js b/src/features/user/profile/components/ContactOptions.js index 4125638..454c049 100644 --- a/src/features/user/profile/components/ContactOptions.js +++ b/src/features/user/profile/components/ContactOptions.js @@ -1,6 +1,7 @@ import React, { useCallback, useMemo } from "react"; import PropTypes from "prop-types"; import { useTranslation } from "react-i18next"; +import { List } from "@material-ui/core"; import ContactOption from "./ContactOption"; import BusinessCenterIcon from "@material-ui/icons/BusinessCenter"; import EmailIcon from "@material-ui/icons/Email"; @@ -80,7 +81,7 @@ const handleEmailSending = email => event => { event.preventDefault(); }; -const ContactOptions = ({ contactOptions, userName }) => { +const ContactOptions = ({ contactOptions, userName, profilePictureItem }) => { const { t } = useTranslation(); const { copy } = useClipboard(); @@ -125,7 +126,7 @@ const ContactOptions = ({ contactOptions, userName }) => { ); return ( - <> + {sorted.map((z, index) => ( { onClick={z.onClick} /> ))} - + {profilePictureItem && <>{profilePictureItem}} + ); }; ContactOptions.propTypes = { contactOptions: PropTypes.array, - userName: PropTypes.object.isRequired + userName: PropTypes.string.isRequired, + profilePictureItem: PropTypes.node }; export default ContactOptions; diff --git a/src/features/user/profile/components/UserProfileCardContent.js b/src/features/user/profile/components/UserProfileCardContent.js index c18c83a..0905c19 100644 --- a/src/features/user/profile/components/UserProfileCardContent.js +++ b/src/features/user/profile/components/UserProfileCardContent.js @@ -2,7 +2,6 @@ import React from "react"; import PropTypes from "prop-types"; import { Grid, - List, ListItem, ListItemText, ListItemIcon, @@ -33,32 +32,37 @@ const UserProfileCardContent = ({ userData }) => { - - - {profilePictureUrl && ( - - - - - - - - - - - {profilePictureUrl} - - - } - /> - - )} - + + {profilePictureUrl && ( + + + + + + + + + + + {profilePictureUrl} + + + } + /> + + )} + + } + />