A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
refactor: Update badge labels to use multiplication symbol instead of 'x'
robinca8c4b40c653
diff --git a/ui/src/components/CardBadge/index.tsx b/ui/src/components/CardBadge/index.tsxindex fcb1bb9d..a2a0bd7d 100644--- a/ui/src/components/CardBadge/index.tsx+++ b/ui/src/components/CardBadge/index.tsx@@ -49,14 +49,16 @@ const Index: FC<IProps> = ({className="card text-center badge-card"to={`/badges/${data.id}${urlSearchParams ? `?${urlSearchParams}` : ''}`}><Card.Body>- {data.earned && badgePillType === 'earned' && (+ {Number(data?.earned_count) > 0 && badgePillType === 'earned' && (<Badge bg="success" className="label">- {t('earned')}+ {`${t('earned')}${+ Number(data?.earned_count) > 1 ? ` ×${data.earned_count}` : ''+ }`}</Badge>)}- {badgePillType === 'count' && Number(data?.earned_count) > 0 && (- <Badge pill bg="success" className="label">+ {badgePillType === 'count' && Number(data?.earned_count) > 1 && (+ <Badge pill bg="secondary" className="label">×{data.earned_count}</Badge>)}diff --git a/ui/src/pages/Badges/Detail/components/Badge/index.tsx b/ui/src/pages/Badges/Detail/components/Badge/index.tsxindex 29da1af6..a554a6bc 100644--- a/ui/src/pages/Badges/Detail/components/Badge/index.tsx+++ b/ui/src/pages/Badges/Detail/components/Badge/index.tsx@@ -77,11 +77,14 @@ const Index: FC<IProps> = ({ data }) => {</span>)}- {data.earned_count > 0 && (+ {data.earned_count > 1 && (<Badge bg="success">{t('earned_×', { number: data.earned_count })}</Badge>)}+ {data.earned_count === 1 && (+ <Badge bg="success">{t('earned')}</Badge>+ )}</div>)}</div>diff --git a/ui/src/pages/Users/Personal/components/NavBar/index.tsx b/ui/src/pages/Users/Personal/components/NavBar/index.tsxindex 5f4360ed..9c6d157a 100644--- a/ui/src/pages/Users/Personal/components/NavBar/index.tsx+++ b/ui/src/pages/Users/Personal/components/NavBar/index.tsx@@ -60,7 +60,6 @@ const list = [name: 'votes',},{- role: 'self', // Only visible to authorpath: '/badges',name: 'badges',},