add safe area view to profile error screen (#7134)

This commit is contained in:
Samuel Newman
2024-12-17 00:02:56 +00:00
committed by GitHub
parent de97c07c63
commit 1a160df396
+5
View File
@@ -1,5 +1,6 @@
import React, {useCallback, useMemo} from 'react'
import {StyleSheet} from 'react-native'
import {SafeAreaView} from 'react-native-safe-area-context'
import {
AppBskyActorDefs,
AppBskyGraphGetActorStarterPacks,
@@ -122,6 +123,7 @@ function ProfileScreenInner({route}: Props) {
}
if (resolveError || profileError) {
return (
<SafeAreaView style={[a.flex_1]}>
<ErrorScreen
testID="profileErrorScreen"
title={profileError ? _(msg`Not Found`) : _(msg`Oops!`)}
@@ -129,6 +131,7 @@ function ProfileScreenInner({route}: Props) {
onPressTryAgain={onPressTryAgain}
showHeader
/>
</SafeAreaView>
)
}
if (profile && moderationOpts) {
@@ -144,6 +147,7 @@ function ProfileScreenInner({route}: Props) {
}
// should never happen
return (
<SafeAreaView style={[a.flex_1]}>
<ErrorScreen
testID="profileErrorScreen"
title="Oops!"
@@ -151,6 +155,7 @@ function ProfileScreenInner({route}: Props) {
onPressTryAgain={onPressTryAgain}
showHeader
/>
</SafeAreaView>
)
}