Skip to content

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.

feat(ui):hide related questions card when there is no content

Dinesht04aa75f4455dc1
diff --git a/ui/src/pages/Questions/Detail/components/RelatedQuestions/index.tsx b/ui/src/pages/Questions/Detail/components/RelatedQuestions/index.tsx
index a8934436..19bf269d 100644
--- a/ui/src/pages/Questions/Detail/components/RelatedQuestions/index.tsx
+++ b/ui/src/pages/Questions/Detail/components/RelatedQuestions/index.tsx
@@ -43,6 +43,10 @@ const Index: FC<Props> = ({ id }) => {
return null;
}
+ if (!isLoading && data?.count === 0) {
+ return null;
+ }
+
return (
<Card>
<Card.Header>{t('title')}</Card.Header>