From ee5fda8dc5eebd3b01b413eb82b76082a46455d4 Mon Sep 17 00:00:00 2001 From: Onuwa Nnachi Isaac Date: Wed, 15 Jan 2020 13:33:21 +0100 Subject: [PATCH] Add review icon (#64) * Add review icon * Check if status is APPROVED --- src/common/assets/images/reviewBadge.svg | 5 ++++ .../components/DappListItem/DappListItem.jsx | 24 +++++++++++++------ .../DappListItem/DappListItem.module.scss | 13 +++++++++- src/modules/Profile/Profile.jsx | 8 +++++++ src/modules/Profile/Profile.module.scss | 12 ++++++++++ 5 files changed, 54 insertions(+), 8 deletions(-) create mode 100644 src/common/assets/images/reviewBadge.svg diff --git a/src/common/assets/images/reviewBadge.svg b/src/common/assets/images/reviewBadge.svg new file mode 100644 index 0000000..6d5d4fe --- /dev/null +++ b/src/common/assets/images/reviewBadge.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/common/components/DappListItem/DappListItem.jsx b/src/common/components/DappListItem/DappListItem.jsx index bc90a4d..b57b459 100644 --- a/src/common/components/DappListItem/DappListItem.jsx +++ b/src/common/components/DappListItem/DappListItem.jsx @@ -7,6 +7,7 @@ import icon from '../../assets/images/icon.svg' import sntIcon from '../../assets/images/SNT.svg' import upvoteArrowIcon from '../../assets/images/upvote-arrow.svg' import downvoteArrowIcon from '../../assets/images/downvote-arrow.svg' +import reviewBadge from '../../assets/images/reviewBadge.svg' const DappListItem = props => { const { @@ -20,7 +21,7 @@ const DappListItem = props => { onToggleProfileModal, } = props - const { name, description, image } = dapp + const { name, description, image, status } = dapp const handleUpVote = () => { onClickUpVote(dapp) @@ -43,12 +44,21 @@ const DappListItem = props => { className={styles.imgWrapper} onClick={() => onToggleProfileModal(dapp.id, name)} > - +
+ + {status === 'APPROVED' && ( + review badge + )} +
onToggleProfileModal(dapp.id, name)}> diff --git a/src/common/components/DappListItem/DappListItem.module.scss b/src/common/components/DappListItem/DappListItem.module.scss index 66aa17a..076218d 100644 --- a/src/common/components/DappListItem/DappListItem.module.scss +++ b/src/common/components/DappListItem/DappListItem.module.scss @@ -42,15 +42,26 @@ cursor: pointer; } +.logo { + display: flex; + align-items: center; + padding: 0 calculateRem(20); +} + .image { max-width: calculateRem(40); max-height: calculateRem(40); - margin-top: calculateRem(15); + margin-top: calculateRem(10); margin-right: calculateRem(16); border-radius: 50%; cursor: pointer; } +.review_icon { + margin-left: calculateRem(-30); + margin-top: calculateRem(40); +} + .url { font-size: calculateRem(12); color: $link-color; diff --git a/src/modules/Profile/Profile.jsx b/src/modules/Profile/Profile.jsx index 36e57a3..f203b29 100644 --- a/src/modules/Profile/Profile.jsx +++ b/src/modules/Profile/Profile.jsx @@ -4,6 +4,7 @@ import ReactImageFallback from 'react-image-fallback' import Modal from '../../common/components/Modal' import styles from './Profile.module.scss' import icon from '../../common/assets/images/icon.svg' +import reviewBadge from '../../common/assets/images/reviewBadge.svg' import { DappState } from '../../common/data/dapp' const ProfileContent = ({ @@ -17,6 +18,7 @@ const ProfileContent = ({ editable, onClickWithdraw, onClickUpdateMetadata, + status, }) => { return ( <> @@ -60,6 +62,12 @@ const ProfileContent = ({
+ {status === 'APPROVED' && ( +
+ review badge + Reviewed +
+ )}
Ranking
diff --git a/src/modules/Profile/Profile.module.scss b/src/modules/Profile/Profile.module.scss index 711a4d5..4bdeef6 100644 --- a/src/modules/Profile/Profile.module.scss +++ b/src/modules/Profile/Profile.module.scss @@ -115,6 +115,18 @@ a { flex-direction: column; } +.reviewed { + border-bottom: 1px solid #eef2f5; + box-shadow: inset 0px 1px 0px #eef2f5; + padding: calculateRem(15) calculateRem(20); + display: flex; + flex-direction: row; + span { + margin-left: calculateRem(10); + align-self: center; + } +} + .ranking { border-bottom: 1px solid #eef2f5; box-shadow: inset 0px 1px 0px #eef2f5;