Commit c60f9a6f authored by Chunchi Che's avatar Chunchi Che

fix

parent a6668f06
Pipeline #21095 failed with stages
in 4 minutes and 18 seconds
......@@ -68,7 +68,8 @@
"opAvatarColor":"#e10e68"
},
"hint":{
"waitingDuration":1.5
"waitingDuration":1.5,
"maxCount": 3
}
},
"unimplementedWhiteList":[
......
......@@ -68,7 +68,8 @@
"opAvatarColor":"#e10e68"
},
"hint":{
"waitingDuration":1.5
"waitingDuration":1.5,
"maxCount": 3
}
},
"unimplementedWhiteList":[
......
......@@ -35,16 +35,12 @@ const CheckCardModalV2 = () => {
const responseable = useAppSelector(selectCheckCardModalV2ResponseAble);
const selectHint = useAppSelector(selectMeHint)?.esSelectHint || "请选择卡片";
const onFinish = () => {
const onFinishOrCancel = () => {
sendSelectUnselectCardResponse({ cancel_or_finish: true });
dispatch(setCheckCardModalV2IsOpen(false));
dispatch(resetCheckCardModalV2());
dispatch(setCheckCardModalV2ResponseAble(false));
};
const onCancel = () => {
sendSelectUnselectCardResponse({ cancel_or_finish: true });
dispatch(setCheckCardModalV2ResponseAble(false));
};
return (
<DragModal
......@@ -53,10 +49,16 @@ const CheckCardModalV2 = () => {
closable={false}
footer={
<>
<Button disabled={!finishable || !responseable} onClick={onFinish}>
<Button
disabled={!finishable || !responseable}
onClick={onFinishOrCancel}
>
finish
</Button>
<Button disabled={!cancelable || !responseable} onClick={onCancel}>
<Button
disabled={!cancelable || !responseable}
onClick={onFinishOrCancel}
>
cancel
</Button>
</>
......
......@@ -17,7 +17,9 @@ const HintNotification = () => {
const result = useAppSelector(selectDuelResult);
const navigate = useNavigate();
const [api, contextHolder] = notification.useNotification();
const [api, contextHolder] = notification.useNotification({
maxCount: NeosConfig.ui.hint.maxCount,
});
useEffect(() => {
if (meHint && meHint.msg) {
api.info({
......@@ -25,7 +27,7 @@ const HintNotification = () => {
placement: "bottom",
});
}
}, [meHint]);
}, [meHint?.msg]);
useEffect(() => {
if (opHint && opHint.msg) {
......@@ -34,7 +36,7 @@ const HintNotification = () => {
placement: "top",
});
}
}, [opHint]);
}, [opHint?.msg]);
useEffect(() => {
if (currentPhase) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment