From 06f0021660bd7245c4a34547af6ae45b8b5c5693 Mon Sep 17 00:00:00 2001 From: Omid Nikrah Date: Sat, 18 Jul 2020 21:20:04 +0430 Subject: [PATCH] chore: Hide star and fork stats in repo card if count of equals to zero (#97) * add show_icons option to show/hide star and fork icon in repo cards * resolve conflict * resolve conflict * hide star and fork stats in repo card if count of equals to zero * HOTFIX * HOTFIX --- src/renderRepoCard.js | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/renderRepoCard.js b/src/renderRepoCard.js index 56fb7cdf8dd34..c3e5a602793a9 100644 --- a/src/renderRepoCard.js +++ b/src/renderRepoCard.js @@ -67,19 +67,23 @@ const renderRepoCard = (repo, options = {}) => { ${langName} - - - ${icons.star} - - ${totalStars} - + ${(stargazers.totalCount > 0) ? ` + + + ${icons.star} + + ${totalStars} + + ` : ''} - - - ${icons.fork} - - ${totalForks} - + ${(totalForks > 0) ? ` + + + ${icons.fork} + + ${totalForks} + + ` : ''} `; };