From b92a01e2a413cc2fc09db94b94e20cddb35b2d76 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Tue, 29 Dec 2020 12:36:21 +0100 Subject: [PATCH] Fixed https://sentry.io/organizations/xmflsct/issues/2117699903/ --- src/screens/Shared/Account/Information.tsx | 14 +++++++++----- src/screens/Shared/Account/Information/Account.tsx | 8 ++++---- src/screens/Shared/Account/Information/Actions.tsx | 4 ++-- src/screens/Shared/Account/Information/Fields.tsx | 4 ++-- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/screens/Shared/Account/Information.tsx b/src/screens/Shared/Account/Information.tsx index 03c07b8e..b1beb190 100644 --- a/src/screens/Shared/Account/Information.tsx +++ b/src/screens/Shared/Account/Information.tsx @@ -60,21 +60,25 @@ const AccountInformation: React.FC = ({ {/* Moved or not: {account.moved} */} - {!disableActions && } + {!disableActions ? ( + + ) : null} - {account?.fields && account.fields.length > 0 && ( + {account?.fields && account.fields.length > 0 ? ( - )} + ) : null} - {account?.note && account.note.length > 0 && account.note !== '

' && ( + {account?.note && + account.note.length > 0 && + account.note !== '

' ? ( // Empty notes might generate empty p tag - )} + ) : null} diff --git a/src/screens/Shared/Account/Information/Account.tsx b/src/screens/Shared/Account/Information/Account.tsx index 6de24f16..5e1ea0d6 100644 --- a/src/screens/Shared/Account/Information/Account.tsx +++ b/src/screens/Shared/Account/Information/Account.tsx @@ -37,16 +37,16 @@ const AccountInformationAccount = forwardRef( > @{account?.acct} - {account?.locked && ( + {account?.locked ? ( - )} - {account?.bot && ( + ) : null} + {account?.bot ? ( - )} + ) : null} ) diff --git a/src/screens/Shared/Account/Information/Actions.tsx b/src/screens/Shared/Account/Information/Actions.tsx index ba154a70..c2eb9275 100644 --- a/src/screens/Shared/Account/Information/Actions.tsx +++ b/src/screens/Shared/Account/Information/Actions.tsx @@ -124,7 +124,7 @@ const AccountInformationActions: React.FC = ({ account }) => { return ( - {query.data && !query.data.blocked_by && ( + {query.data && !query.data.blocked_by ? (