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> </div>
{showModal && ( {showModal && (
<Modal <Modal
onClick={(e) => { onClose={() => {
if (e.target === e.currentTarget) {
setShowModal(false); setShowModal(false);
}
}} }}
> >
<div id="media-sheet" class="sheet sheet-max"> <div id="media-sheet" class="sheet sheet-max">