improve ListFooter error state
This commit is contained in:
+14
-18
@@ -85,27 +85,23 @@ function ListFooterMaybeError({
|
|||||||
a.align_center,
|
a.align_center,
|
||||||
t.atoms.bg_contrast_25,
|
t.atoms.bg_contrast_25,
|
||||||
]}>
|
]}>
|
||||||
<Text
|
<View style={[a.flex_1, a.justify_center]}>
|
||||||
style={[a.flex_1, a.text_sm, t.atoms.text_contrast_medium]}
|
<Text style={[a.text_sm, a.font_medium, t.atoms.text_contrast_high]}>
|
||||||
numberOfLines={2}>
|
<Trans>Oops, an error occurred</Trans>
|
||||||
{error ? (
|
|
||||||
cleanError(error)
|
|
||||||
) : (
|
|
||||||
<Trans>Oops, something went wrong!</Trans>
|
|
||||||
)}
|
|
||||||
</Text>
|
</Text>
|
||||||
|
{error && (
|
||||||
|
<Text
|
||||||
|
style={[a.text_sm, t.atoms.text_contrast_low]}
|
||||||
|
numberOfLines={2}>
|
||||||
|
{cleanError(error)}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
</View>
|
||||||
<Button
|
<Button
|
||||||
variant="solid"
|
|
||||||
label={_(msg`Press to retry`)}
|
label={_(msg`Press to retry`)}
|
||||||
style={[
|
onPress={onRetry}
|
||||||
a.align_center,
|
color="secondary_inverted"
|
||||||
a.justify_center,
|
size="small">
|
||||||
a.rounded_sm,
|
|
||||||
a.overflow_hidden,
|
|
||||||
a.px_md,
|
|
||||||
a.py_sm,
|
|
||||||
]}
|
|
||||||
onPress={onRetry}>
|
|
||||||
<ButtonText>
|
<ButtonText>
|
||||||
<Trans>Retry</Trans>
|
<Trans>Retry</Trans>
|
||||||
</ButtonText>
|
</ButtonText>
|
||||||
|
|||||||
Reference in New Issue
Block a user