fix: similar questions ui changed

This commit is contained in:
shuai 2023-08-25 18:20:47 +08:00
parent af8d6cc7cf
commit 46f2e7b807
1 changed files with 13 additions and 9 deletions

View File

@ -40,18 +40,22 @@ const SearchQuestion = ({ similarQuestions }) => {
{item.accepted_answer ? ( {item.accepted_answer ? (
<span className="ms-3 text-success"> <span className="ms-3 text-success">
<Icon type="bi" name="check-circle-fill" /> <Icon type="bi" name="check-circle-fill" />
<span className="ms-1">{item.answer_count}</span> <span className="ms-1">
{t('x_answers', {
keyPrefix: 'question',
count: item.answer_count,
})}
</span>
</span> </span>
) : ( ) : (
item.answer_count > 0 && ( item.answer_count > 0 && (
<span className="ms-3"> <span className="ms-3 text-secondary">
<Icon <Icon type="bi" name="chat-square-text-fill" />
type="bi" <span className="ms-1">
name="chat-square-text-fill" {t('x_answers', {
className="text-secondary" keyPrefix: 'question',
/> count: item.answer_count,
<span className="ms-1 text-primary"> })}
{item.answer_count}
</span> </span>
</span> </span>
) )