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: closed question hidden write answer

shuai83d1c57c056c
diff --git a/ui/src/pages/Questions/Detail/index.tsx b/ui/src/pages/Questions/Detail/index.tsx
index 6204e3ff..a6b3cc2d 100644
--- a/ui/src/pages/Questions/Detail/index.tsx
+++ b/ui/src/pages/Questions/Detail/index.tsx
@@ -240,15 +240,17 @@ const Index = () => {
</div>
)}
- {!isLoading && !question?.operation?.type && (
- <WriteAnswer
- data={{
- qid,
- answered: question?.answered,
- }}
- callback={writeAnswerCallback}
- />
- )}
+ {!isLoading &&
+ Number(question?.status) !== 2 &&
+ !question?.operation?.type && (
+ <WriteAnswer
+ data={{
+ qid,
+ answered: question?.answered,
+ }}
+ callback={writeAnswerCallback}
+ />
+ )}
</Col>
<Col xxl={3} lg={4} sm={12} className="mt-5 mt-lg-0">
<RelatedQuestions id={question?.id || ''} />