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.
fix: linked question component not use empty content
shuaie0ffb9670d76
diff --git a/ui/src/components/Modal/BadgeModal.tsx b/ui/src/components/Modal/BadgeModal.tsxindex 18524852..5cb6c360 100644--- a/ui/src/components/Modal/BadgeModal.tsx+++ b/ui/src/components/Modal/BadgeModal.tsx@@ -98,7 +98,6 @@ const BadgeModal: FC<BadgeModalProps> = ({ badge, visible }) => {};const destroyAnimation = () => {- console.log('destroyAnimation');clearTimeout(timeout);bg1?.destroy();bg2?.destroy();diff --git a/ui/src/pages/Questions/Detail/components/LinkedQuestions/index.tsx b/ui/src/pages/Questions/Detail/components/LinkedQuestions/index.tsxindex 0706cc4b..208953b6 100644--- a/ui/src/pages/Questions/Detail/components/LinkedQuestions/index.tsx+++ b/ui/src/pages/Questions/Detail/components/LinkedQuestions/index.tsx@@ -58,45 +58,35 @@ const Index: FC<Props> = ({ id }) => {</Link></Card.Header><ListGroup variant="flush">- {data.list.length > 0 ? (- data.list.map((item) => (- <ListGroup.Item- action- key={item.id}- as={Link}- to={pathFactory.questionLanding(item.id, item.url_title)}>- <div className="link-dark">{item.title}</div>- {item.answer_count > 0 && (- <div- className={`mt-1 small me-2 ${+ {data.list?.map((item) => (+ <ListGroup.Item+ action+ key={item.id}+ as={Link}+ to={pathFactory.questionLanding(item.id, item.url_title)}>+ <div className="link-dark">{item.title}</div>+ {item.answer_count > 0 && (+ <div+ className={`mt-1 small me-2 ${+ item.accepted_answer_id > 0+ ? 'link-success'+ : 'link-secondary'+ }`}>+ <Icon+ name={item.accepted_answer_id > 0- ? 'link-success'- : 'link-secondary'- }`}>- <Icon- name={- item.accepted_answer_id > 0- ? 'check-circle-fill'- : 'chat-square-text-fill'- }- className="me-1"- />- <span>- {item.answer_count} {t2('answers')}- </span>- </div>- )}- </ListGroup.Item>- ))- ) : (- <div- className="text-muted"- style={{- padding: 'var(--bs-card-spacer-y) var(--bs-card-spacer-x)',- }}>- {t('no_linked_question')}- </div>- )}+ ? 'check-circle-fill'+ : 'chat-square-text-fill'+ }+ className="me-1"+ />+ <span>+ {item.answer_count} {t2('answers')}+ </span>+ </div>+ )}+ </ListGroup.Item>+ ))}</ListGroup></Card>);