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

shuai pushed a commit to branch feat/1.3.0/ui
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git


The following commit(s) were added to refs/heads/feat/1.3.0/ui by this push:
     new a8345ca3 fix: after the review is completed, it will automatically 
switch to other types to be reviewed
a8345ca3 is described below

commit a8345ca3074cb57fb8b0f6b8a55f0669fd970fc7
Author: shuai <[email protected]>
AuthorDate: Wed Mar 13 15:02:51 2024 +0800

    fix: after the review is completed, it will automatically switch to other 
types to be reviewed
---
 ui/src/pages/Review/index.tsx | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/ui/src/pages/Review/index.tsx b/ui/src/pages/Review/index.tsx
index a0590e7e..4febbb9e 100644
--- a/ui/src/pages/Review/index.tsx
+++ b/ui/src/pages/Review/index.tsx
@@ -57,6 +57,13 @@ const Index: FC = () => {
           if (filterData.length > 0) {
             if (changeReviewType) {
               setCurrentReviewType(filterData[0].name);
+            } else {
+              const currentTypeItem = resp.find(
+                (item) => item.name === currentReviewType,
+              );
+              if (currentTypeItem?.todo_amount === 0) {
+                setCurrentReviewType(filterData[0].name);
+              }
             }
           } else {
             setIsEmpty(true);

Reply via email to