diff --git a/src/screens/Messages/Conversation/index.tsx b/src/screens/Messages/Conversation/index.tsx index db22f9e3..c6cbf989 100644 --- a/src/screens/Messages/Conversation/index.tsx +++ b/src/screens/Messages/Conversation/index.tsx @@ -19,8 +19,8 @@ import {PreviewableUserAvatar} from 'view/com/util/UserAvatar' import {CenteredView} from 'view/com/util/Views' import {MessagesList} from '#/screens/Messages/Conversation/MessagesList' import {atoms as a, useBreakpoints, useTheme} from '#/alf' -import {Button, ButtonText} from '#/components/Button' import {ConvoMenu} from '#/components/dms/ConvoMenu' +import {Error} from '#/components/Error' import {ListMaybePlaceholder} from '#/components/Lists' import {Text} from '#/components/Typography' import {ClipClopGate} from '../gate' @@ -54,29 +54,30 @@ export function MessagesConversationScreen({route}: Props) { function Inner() { const convo = useConvo() + const {_} = useLingui() if ( convo.status === ConvoStatus.Uninitialized || convo.status === ConvoStatus.Initializing ) { - return + return ( + +
+ + + ) } if (convo.status === ConvoStatus.Error) { - // TODO return ( - - - Something went wrong - - - + +
+ convo.error.retry()} + /> + ) } @@ -86,7 +87,7 @@ function Inner() { return ( - +
@@ -97,7 +98,7 @@ function Inner() { let Header = ({ profile, }: { - profile: AppBskyActorDefs.ProfileViewBasic + profile?: AppBskyActorDefs.ProfileViewBasic }): React.ReactNode => { const t = useTheme() const {_} = useLingui() @@ -152,12 +153,34 @@ let Header = ({ )} - - - {profile.displayName} - + {profile ? ( + <> + + + {profile.displayName} + + + ) : ( + <> + + + + )} - {convo.status === ConvoStatus.Ready ? ( + {convo.status === ConvoStatus.Ready && profile ? (