From 0435199d53b52c02f9462979ac484beff4bdd0e1 Mon Sep 17 00:00:00 2001 From: Bojan Mojsilovic Date: Thu, 27 Jul 2023 09:54:50 +0200 Subject: [PATCH] Fix current user check on profile page --- src/pages/Profile.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/pages/Profile.tsx b/src/pages/Profile.tsx index 8c7ca31..4a963c6 100644 --- a/src/pages/Profile.tsx +++ b/src/pages/Profile.tsx @@ -180,6 +180,13 @@ const Profile: Component = () => { return styles.cacheFlag; } + const isCurrentUser = () => { + if (!account || !profile || !account.isKeyLookupDone) { + return false; + } + return account?.publicKey === profile?.profileKey; + }; + return ( <> {
- +