Browse Source

Merge pull request #1440 from visuddhinanda/agile

setBgColor 蓝色
visuddhinanda 2 years ago
parent
commit
76f54a5d3d
1 changed files with 7 additions and 3 deletions
  1. 7 3
      dashboard/src/components/template/SentEdit/SentCell.tsx

+ 7 - 3
dashboard/src/components/template/SentEdit/SentCell.tsx

@@ -46,12 +46,16 @@ const SentCellWidget = ({
   const anchorInfo = useAppSelector(anchor);
   const sid = `${sentData?.book}_${sentData?.para}_${sentData?.wordStart}_${sentData?.wordEnd}_${sentData?.channel.id}`;
   useEffect(() => {
-    if (discussionMessage && discussionMessage.resId === initValue?.id) {
-      setBgColor("wheat");
+    if (
+      discussionMessage &&
+      discussionMessage.resId &&
+      discussionMessage.resId === initValue?.id
+    ) {
+      setBgColor("#1890ff33");
     } else {
       setBgColor("unset");
     }
-  }, [discussionMessage?.resId, initValue?.id]);
+  }, [discussionMessage, initValue?.id]);
 
   useEffect(() => {
     if (anchorInfo && anchorInfo?.resId === initValue?.id) {