You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by sh...@apache.org on 2025/09/10 07:57:22 UTC

(answer) branch test updated: fix: Filter out parameters of linked list unanswered

This is an automated email from the ASF dual-hosted git repository.

shuai pushed a commit to branch test
in repository https://gitbox.apache.org/repos/asf/answer.git


The following commit(s) were added to refs/heads/test by this push:
     new e071f3e7 fix: Filter out parameters of linked list unanswered
e071f3e7 is described below

commit e071f3e7b6cc260bd13a7427b5034b33a85e2761
Author: shuai <li...@sifou.com>
AuthorDate: Wed Sep 10 15:57:04 2025 +0800

    fix: Filter out parameters of linked list unanswered
---
 .../pages/Questions/Detail/components/LinkedQuestions/index.tsx  | 2 +-
 ui/src/pages/Questions/Linked/index.tsx                          | 9 ++++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ui/src/pages/Questions/Detail/components/LinkedQuestions/index.tsx b/ui/src/pages/Questions/Detail/components/LinkedQuestions/index.tsx
index 22952af0..42a0c94e 100644
--- a/ui/src/pages/Questions/Detail/components/LinkedQuestions/index.tsx
+++ b/ui/src/pages/Questions/Detail/components/LinkedQuestions/index.tsx
@@ -53,7 +53,7 @@ const Index: FC<Props> = ({ id }) => {
     <Card className="mb-4">
       <Card.Header className="text-nowrap d-flex justify-content-between text-capitalize">
         {t('title')}
-        <Link to={`/questions/linked/${id}`} className="btn btn-link p-0">
+        <Link to={`/linked/${id}`} className="btn btn-link p-0">
           {t('more', { keyPrefix: 'btns' })}
         </Link>
       </Card.Header>
diff --git a/ui/src/pages/Questions/Linked/index.tsx b/ui/src/pages/Questions/Linked/index.tsx
index 9a08af52..bf8465fa 100644
--- a/ui/src/pages/Questions/Linked/index.tsx
+++ b/ui/src/pages/Questions/Linked/index.tsx
@@ -73,6 +73,11 @@ const LinkedQuestions: FC = () => {
     title: t('title'),
   });
 
+  console.log(
+    'listData',
+    QUESTION_ORDER_KEYS.filter((v) => v !== 'unanswered').slice(0, 5),
+  );
+
   return (
     <Row className="pt-4 mb-5">
       <Col className="page-main flex-auto">
@@ -85,7 +90,9 @@ const LinkedQuestions: FC = () => {
           source="linked"
           data={listData}
           order={curOrder}
-          orderList={QUESTION_ORDER_KEYS.slice(0, 5)}
+          orderList={QUESTION_ORDER_KEYS.filter(
+            (v) => v !== 'unanswered',
+          ).slice(0, 5)}
           isLoading={listLoading}
         />
       </Col>