hide popup when click setting

This commit is contained in:
Gabe Yuan
2023-08-09 04:39:50 +08:00
parent 9660948ced
commit a9609cfb0d
2 changed files with 3 additions and 2 deletions

View File

@@ -103,7 +103,7 @@ export default function Action() {
}
>
<Paper>
<Popup />
<Popup setShowPopup={setShowPopup} />
</Paper>
</Draggable>
<Draggable

View File

@@ -21,7 +21,7 @@ import {
MSG_TRANS_CURRULE,
} from "../../config";
export default function Popup() {
export default function Popup({ setShowPopup }) {
const i18n = useI18n();
const [rule, setRule] = useState(null);
@@ -31,6 +31,7 @@ export default function Popup() {
} else {
window.open(process.env.REACT_APP_OPTIONSPAGE, "_blank");
}
setShowPopup && setShowPopup(false);
};
const handleTransToggle = async (e) => {