Skip to content

Commit

Permalink
Merge pull request #206 from dappforce/improvement/reward
Browse files Browse the repository at this point in the history
Hide creator rewards if no data for it
  • Loading branch information
teodorus-nathaniel authored Jan 26, 2024
2 parents 2176add + d7307e5 commit 88396de
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/components/creators/rewards/RewardInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,17 @@ export default function RewardInfo({ size, ...props }: RewardInfoProps) {
)
}

const hasCreatorReward = (data?.receivedLikes ?? 0) > 0

return (
<div {...props} className={clsx(styles.RewardInfo, props.className)}>
<StakerRewardInfo rewardReport={data} size={size} loading={loading} />
<div className='pt-2 mt-2.5' style={{ borderTop: '1px solid #E2E8F0' }} />
<CreatorRewardInfo rewardReport={data} size={size} loading={loading} />
{hasCreatorReward && (
<>
<div className='pt-2 mt-2.5' style={{ borderTop: '1px solid #E2E8F0' }} />
<CreatorRewardInfo rewardReport={data} size={size} loading={loading} />
</>
)}
<div
className='mt-3'
style={{
Expand Down

0 comments on commit 88396de

Please sign in to comment.