From cd5d581e63a9896dca3186bc085b19b259b8e59f Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Sun, 10 May 2026 13:34:45 +0200 Subject: [PATCH] Simplify user page error handling: consolidate account deletion and profile not found states into a single fallback component --- web/pages/[username]/index.tsx | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/web/pages/[username]/index.tsx b/web/pages/[username]/index.tsx index 99739ce1..db140ffc 100644 --- a/web/pages/[username]/index.tsx +++ b/web/pages/[username]/index.tsx @@ -229,18 +229,6 @@ export default function UserPage(props: UserPageProps) { return } - if (!fetchedProps.user) { - return ( - - -
- {t('userpage.accountDeleted', 'This account has been deleted.')} -
- -
- ) - } - if (fetchedProps.user?.isBannedFromPosting) { return ( @@ -253,18 +241,12 @@ export default function UserPage(props: UserPageProps) { ) } - if (!fetchedProps.profile) { - return ( - - -
- {t('custom404.profileNotFound', 'Profile not found.')} -
- -
- ) + if (!fetchedProps.user || !fetchedProps.profile) { + return } + // console.log('fetchedProps', fetchedProps) + return }