From 908efb17ffcb257aca2e7a8dbffb1753a36bf859 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sat, 16 Sep 2023 14:47:55 +0800 Subject: [PATCH] Use onClose --- src/components/account-info.jsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/components/account-info.jsx b/src/components/account-info.jsx index aae0db9e..df708925 100644 --- a/src/components/account-info.jsx +++ b/src/components/account-info.jsx @@ -1056,10 +1056,8 @@ function RelatedActions({ info, instance, authenticated, standalone }) { {!!showTranslatedBio && ( { - if (e.target === e.currentTarget) { - setShowTranslatedBio(false); - } + onClose={() => { + setShowTranslatedBio(false); }} > { - if (e.target === e.currentTarget) { - setShowAddRemoveLists(false); - } + onClose={() => { + setShowAddRemoveLists(false); }} >