Add XRPC error handling for creating new chats (#10622)

This commit is contained in:
DS Boyce
2026-05-27 08:05:51 -07:00
committed by GitHub
parent a892b3dcc9
commit 731f32abda
2 changed files with 73 additions and 13 deletions
+12 -6
View File
@@ -707,12 +707,14 @@ function NewGroupChatButton({onPress}: {onPress: () => void}) {
const t = useTheme()
const {t: l} = useLingui()
const handleOnPress = () => {
onPress()
}
return (
<Button label={l`New group chat`} onPress={handleOnPress}>
<Button
label={l({
message: 'New group chat',
context: 'action',
comment: 'Button used to create a new group chat.',
})}
onPress={onPress}>
{({hovered, pressed, focused}) => (
<View
style={[
@@ -740,7 +742,11 @@ function NewGroupChatButton({onPress}: {onPress: () => void}) {
<View style={[a.flex_grow]}>
<Text
style={[a.text_md, a.font_medium, a.leading_snug, t.atoms.text]}>
<Trans>New group chat</Trans>
<Trans
context="action"
comment="Button used to create a new group chat.">
New group chat
</Trans>
</Text>
</View>
<ChevronRightIcon size="md" fill={t.palette.contrast_1000} />