From 80b8c7be09965f2725094fd84b3a610645e60311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Ferreiro?= Date: Tue, 6 Dec 2022 15:08:19 +0000 Subject: [PATCH] remove unnecessary isMe prop --- src/view/com/profile/ProfileHeader.tsx | 7 +------ src/view/com/util/UserAvatar.tsx | 4 +--- src/view/com/util/UserBanner.tsx | 12 +++++++----- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/view/com/profile/ProfileHeader.tsx b/src/view/com/profile/ProfileHeader.tsx index 2642868fb2..d23be65a36 100644 --- a/src/view/com/profile/ProfileHeader.tsx +++ b/src/view/com/profile/ProfileHeader.tsx @@ -152,15 +152,10 @@ export const ProfileHeader = observer(function ProfileHeader({ } return ( - + > @@ -108,7 +106,7 @@ export function UserAvatar({ /> - ) : isMe && userAvatar != null ? ( + ) : userAvatar != null ? ( > }) { @@ -35,7 +33,9 @@ export function UserBanner({ width: 1500, height: 500, }).then(item => { - setUserBanner(item.path) + if (setUserBanner != null) { + setUserBanner(item.path) + } }) }, }, @@ -51,7 +51,9 @@ export function UserBanner({ width: 1500, height: 500, }).then(croppedItem => { - setUserBanner(croppedItem.path) + if (setUserBanner != null) { + setUserBanner(croppedItem.path) + } }) }) }, @@ -93,7 +95,7 @@ export function UserBanner({ /> - ) : isMe && userBanner != null ? ( + ) : userBanner != null ? (