Skip to content

Commit

Permalink
feat(qna): display count when expanding (#4364)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentlp committed Jan 12, 2021
1 parent ae88195 commit b2f13de
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions modules/qna/src/views/full/Components/QnA.tsx
Expand Up @@ -193,11 +193,10 @@ const QnA: FC<Props> = props => {
<span className={cx(style.tag)}>{lang.tr('module.qna.form.incomplete')}</span>
</Tooltip>
)}
{!expanded && (
<span className={style.tag}>{`${questions?.filter(q => q.trim()).length || 0} ${lang.tr(
'module.qna.form.q'
)} · ${answers?.filter(a => a.trim()).length || 0} ${lang.tr('module.qna.form.a')}`}</span>
)}
<span className={style.tag}>
{`${questions?.filter(q => q.trim()).length || 0} ${lang.tr('module.qna.form.q')}
· ${answers?.filter(a => a.trim()).length || 0} ${lang.tr('module.qna.form.a')}`}
</span>
</div>
</Button>
<MoreOptions show={showOption} onToggle={() => setShowOption(!showOption)} items={moreOptionsItems} />
Expand Down

0 comments on commit b2f13de

Please sign in to comment.