From c30f59c85d8c57a9250635d96e3a295345c45ba7 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Fri, 14 Aug 2020 04:31:15 +0300 Subject: feat: add message to EmptyState --- src/containers/Profile/Profile.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/containers/Profile/Profile.tsx') diff --git a/src/containers/Profile/Profile.tsx b/src/containers/Profile/Profile.tsx index fe77ff2..701aa06 100644 --- a/src/containers/Profile/Profile.tsx +++ b/src/containers/Profile/Profile.tsx @@ -27,6 +27,7 @@ const Profile: React.FC = () => { } }, [username, history, user]); + const isOwnProfile = useMemo(() => user?.username === username, [user, username]); const totalVotes = useMemo(() => polls?.reduce( (total: number, current: Poll) => { @@ -47,10 +48,10 @@ const Profile: React.FC = () => { polls ? polls.length ? - : + : : isValidating && } - {user?.username === username && } + {isOwnProfile && } ); }; -- cgit v1.2.3