Use onClose for this

This commit is contained in:
Lim Chee Aun 2024-07-06 09:47:42 +08:00
parent f26dbeb79a
commit 9ea7a1f4db

View file

@ -2316,10 +2316,8 @@ function MediaAttachment({
</div>
{showModal && (
<Modal
onClick={(e) => {
if (e.target === e.currentTarget) {
setShowModal(false);
}
onClose={() => {
setShowModal(false);
}}
>
<div id="media-sheet" class="sheet sheet-max">