Commit ede54487 authored by Chunchi Che's avatar Chunchi Che

clear hint when modal close

parent e130440c
Pipeline #23241 passed with stages
in 12 minutes and 14 seconds
......@@ -109,6 +109,12 @@ export const SelectCardsModal: React.FC<SelectCardsModalProps> = ({
disabled: !submitable,
}}
open={isOpen}
afterClose={() => {
// Modal每次展示时都会消费`esHint`和`esSelectHint`,
// 否则这些提示会保留到下一次Modal展示,可能会疑惑玩家
matStore.hint.esHint = undefined;
matStore.hint.esSelectHint = undefined;
}}
footer={
<>
{cancelable && <Button onClick={onCancel}>{cancelText}</Button>}
......
......@@ -26,6 +26,7 @@ export const YesNoModal: React.FC = () => {
title={`${preHintMsg} ${msg}`}
open={isOpen}
width={400}
afterClose={() => (matStore.hint.esHint = undefined)}
footer={
<>
<Button
......
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