From 1bed8c6c494402d26a15ccfe988f24bef6c9781b Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 15 Oct 2025 18:31:29 -0500 Subject: [PATCH] Handle profile error state by just showing a success message --- src/components/dms/BlockOrDeleteDialog.tsx | 40 ++++++++++++++++++---- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/src/components/dms/BlockOrDeleteDialog.tsx b/src/components/dms/BlockOrDeleteDialog.tsx index 96120ab2d6..961613b560 100644 --- a/src/components/dms/BlockOrDeleteDialog.tsx +++ b/src/components/dms/BlockOrDeleteDialog.tsx @@ -59,20 +59,48 @@ function DialogInner({ params: ReportDialogParams currentScreen: 'list' | 'conversation' }) { - const {data: profile} = useProfileQuery({ + const t = useTheme() + const {_} = useLingui() + const control = Dialog.useDialogContext() + const { + data: profile, + isLoading, + isError, + } = useProfileQuery({ did: params.message.sender.did, }) - return profile ? ( + return isLoading ? ( + + + + ) : isError || !profile ? ( + + + + Report submitted + + + Our moderation team has received your report. + + + + + + ) : ( - ) : ( - - - ) }