diff --git a/src/shared/components/ProfilePage/Header/index.jsx b/src/shared/components/ProfilePage/Header/index.jsx index 8a932cfd7e..fe177a10bf 100644 --- a/src/shared/components/ProfilePage/Header/index.jsx +++ b/src/shared/components/ProfilePage/Header/index.jsx @@ -3,22 +3,12 @@ */ import React, { useEffect, useState } from 'react'; import PT from 'prop-types'; -import { connect } from 'react-redux'; - -import { actions } from 'topcoder-react-lib'; import { isomorphy } from 'topcoder-react-utils'; -import VerifiedBadge from 'assets/images/profile/verified-badge.svg'; -import InfoIcon from 'assets/images/profile/ico-info.svg'; -import Tooltip from 'components/Tooltip'; - import './styles.scss'; -const verifiedBadgeLookerId = '3322'; - -const ProfileHeader = ({ getLookerDone, lookerInfo, info }) => { +const ProfileHeader = ({ info }) => { const [imageUrl, setimageUrl] = useState(); - const [isMemberVerified, setIsMemberVerified] = useState(false); const { handle } = info; useEffect(() => { @@ -31,30 +21,10 @@ const ProfileHeader = ({ getLookerDone, lookerInfo, info }) => { setimageUrl(url); }, []); - useEffect(() => { - if (!lookerInfo || lookerInfo.error) { - getLookerDone(verifiedBadgeLookerId); - } - }, []); - - useEffect(() => { - if (!lookerInfo || lookerInfo.error) { - return; - } - const { lookerData } = lookerInfo; - const currentUserData = lookerData.find(x => x['user.handle'] === handle); - setIsMemberVerified(currentUserData && currentUserData['member_verification.status'] === 'Verified'); - }, [lookerInfo]); - const loadImageError = () => { setimageUrl(null); }; - const tooltipContent = ( -
This member is compliant with Topcoder policies
and is a trusted member of the Topcoder community.
- ); - - return (
@@ -73,23 +43,6 @@ const ProfileHeader = ({ getLookerDone, lookerInfo, info }) => {
{handle}
- - {isMemberVerified && ( -
- - - verified member - -
- - - -
-
- )}
@@ -102,34 +55,8 @@ ProfileHeader.defaultProps = { info: {}, }; -function mapStateToProps(state) { - const { - looker: { - dataSet, - }, - } = state; - return { - lookerInfo: dataSet[verifiedBadgeLookerId], - }; -} - -function mapDispatchToProps(dispatch) { - return { - getLookerDone: (lookerId) => { - dispatch(actions.looker.getLookerDone(lookerId)); - }, - }; -} - ProfileHeader.propTypes = { info: PT.shape(), - lookerInfo: PT.shape().isRequired, - getLookerDone: PT.func.isRequired, }; -const Container = connect( - mapStateToProps, - mapDispatchToProps, -)(ProfileHeader); - -export default Container; +export default ProfileHeader;