error screen tweaks
This commit is contained in:
@@ -3,7 +3,7 @@ import {useLingui} from '@lingui/react/macro'
|
|||||||
|
|
||||||
import {usePdsClient, useSessionApi} from '#/state/session'
|
import {usePdsClient, useSessionApi} from '#/state/session'
|
||||||
import {Error} from '#/components/Error'
|
import {Error} from '#/components/Error'
|
||||||
import {EmojiSad_Stroke2_Corner0_Rounded as EmojiSad} from '#/components/icons/Emoji'
|
import {EmojiSad_Stroke2_Corner0_Rounded as EmojiSadIcon} from '#/components/icons/Emoji'
|
||||||
import {refetchOtherRequiredData} from '#/ageAssurance/data'
|
import {refetchOtherRequiredData} from '#/ageAssurance/data'
|
||||||
import {IS_WEB} from '#/env'
|
import {IS_WEB} from '#/env'
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ export function DataUnavailableScreen() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Error
|
<Error
|
||||||
icon={EmojiSad}
|
icon={EmojiSadIcon}
|
||||||
title={l`Unable to load your account`}
|
title={l`Unable to load your account`}
|
||||||
message={l`We couldn't load your account settings. Check your internet connection and try again.`}
|
message={l`We couldn't load your account settings. Check your internet connection and try again.`}
|
||||||
onRetry={onRetry}
|
onRetry={onRetry}
|
||||||
|
|||||||
@@ -46,9 +46,11 @@ export function Error({
|
|||||||
t.atoms.border_contrast_low,
|
t.atoms.border_contrast_low,
|
||||||
{paddingTop: 175, paddingBottom: 110},
|
{paddingTop: 175, paddingBottom: 110},
|
||||||
]}>
|
]}>
|
||||||
<View style={[a.w_full, a.align_center, a.gap_lg]}>
|
<View style={[a.w_full, a.align_center, a.gap_lg, a.px_md]}>
|
||||||
{Icon && <Icon size="4xl" fill={t.atoms.text_contrast_medium.color} />}
|
{Icon && <Icon size="4xl" fill={t.atoms.text_contrast_medium.color} />}
|
||||||
<Text style={[a.font_semi_bold, a.text_3xl]}>{title}</Text>
|
<Text style={[a.font_semi_bold, a.text_3xl, a.text_center]}>
|
||||||
|
{title}
|
||||||
|
</Text>
|
||||||
<Text
|
<Text
|
||||||
style={[
|
style={[
|
||||||
a.text_md,
|
a.text_md,
|
||||||
@@ -63,7 +65,6 @@ export function Error({
|
|||||||
<View style={[a.gap_md, gtMobile ? {width: 350} : [a.w_full, a.px_lg]]}>
|
<View style={[a.gap_md, gtMobile ? {width: 350} : [a.w_full, a.px_lg]]}>
|
||||||
{onRetry && (
|
{onRetry && (
|
||||||
<Button
|
<Button
|
||||||
variant="solid"
|
|
||||||
color="primary"
|
color="primary"
|
||||||
label={l`Press to retry`}
|
label={l`Press to retry`}
|
||||||
onPress={onRetry}
|
onPress={onRetry}
|
||||||
@@ -77,7 +78,6 @@ export function Error({
|
|||||||
)}
|
)}
|
||||||
{!hideBackButton && secondaryAction ? (
|
{!hideBackButton && secondaryAction ? (
|
||||||
<Button
|
<Button
|
||||||
variant="solid"
|
|
||||||
color={onRetry ? 'secondary' : 'primary'}
|
color={onRetry ? 'secondary' : 'primary'}
|
||||||
label={secondaryAction.accessibilityLabel ?? secondaryAction.label}
|
label={secondaryAction.accessibilityLabel ?? secondaryAction.label}
|
||||||
onPress={secondaryAction.onPress}
|
onPress={secondaryAction.onPress}
|
||||||
|
|||||||
Reference in New Issue
Block a user