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.

fix(QuestionDetail): Remove the `Add Question` link from the `Related Questions` module

haitaoo546df6bcb886
diff --git a/i18n/en_US.yaml b/i18n/en_US.yaml
index dde026a6..7ca9c6fa 100644
--- a/i18n/en_US.yaml
+++ b/i18n/en_US.yaml
@@ -1002,7 +1002,6 @@ ui:
review: Your revision will show after review.
related_question:
title: Related Questions
- btn: Add question
answers: answers
invite_to_answer:
title: People asked
diff --git a/ui/src/pages/Questions/Detail/components/RelatedQuestions/index.tsx b/ui/src/pages/Questions/Detail/components/RelatedQuestions/index.tsx
index 5606fb76..e73811ed 100644
--- a/ui/src/pages/Questions/Detail/components/RelatedQuestions/index.tsx
+++ b/ui/src/pages/Questions/Detail/components/RelatedQuestions/index.tsx
@@ -5,14 +5,12 @@ import { useTranslation } from 'react-i18next';
import { Icon } from '@/components';
import { useSimilarQuestion } from '@/services';
-import { loggedUserInfoStore } from '@/stores';
import { pathFactory } from '@/router/pathFactory';
interface Props {
id: string;
}
const Index: FC<Props> = ({ id }) => {
- const { user } = loggedUserInfoStore();
const { t } = useTranslation('translation', {
keyPrefix: 'related_question',
});
@@ -63,11 +61,6 @@ const Index: FC<Props> = ({ id }) => {
);
})}
</ListGroup>
- {user?.username ? (
- <Card.Footer className="bg-white">
- <Link to="/questions/ask">{t('btn')}</Link>
- </Card.Footer>
- ) : null}
</Card>
);
};