From 4f3d503a356601e05e640d449de85cfb4614d0df Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sat, 18 Mar 2023 20:40:16 +0800 Subject: [PATCH] Don't allow self to mention self lolol --- src/components/account-info.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/account-info.jsx b/src/components/account-info.jsx index f53f6f41..0b26aa0f 100644 --- a/src/components/account-info.jsx +++ b/src/components/account-info.jsx @@ -407,6 +407,7 @@ function RelatedActions({ info, instance, authenticated }) { } = relationship || {}; const [currentInfo, setCurrentInfo] = useState(null); + const [isSelf, setIsSelf] = useState(false); useEffect(() => { if (info) { @@ -439,6 +440,7 @@ function RelatedActions({ info, instance, authenticated }) { if (currentAccount === currentID) { // It's myself! + setIsSelf(true); return; } @@ -543,7 +545,7 @@ function RelatedActions({ info, instance, authenticated }) { } > - {currentAuthenticated && ( + {currentAuthenticated && !isSelf && ( <> {