about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2024-12-17 00:02:56 +0000
committerGitHub <noreply@github.com>2024-12-17 00:02:56 +0000
commit1a160df3962dab21fd9b4514e266652da1a14a4f (patch)
treec58d26c10496159e01e967915ac229a94a5dd572 /src
parentde97c07c63ba4a32a5b5635075a3f9fea7831ff1 (diff)
downloadvoidsky-1a160df3962dab21fd9b4514e266652da1a14a4f.tar.zst
add safe area view to profile error screen (#7134)
Diffstat (limited to 'src')
-rw-r--r--src/view/screens/Profile.tsx33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/view/screens/Profile.tsx b/src/view/screens/Profile.tsx
index ebf1d955d..24e8719e1 100644
--- a/src/view/screens/Profile.tsx
+++ b/src/view/screens/Profile.tsx
@@ -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,13 +123,15 @@ function ProfileScreenInner({route}: Props) {
   }
   if (resolveError || profileError) {
     return (
-      <ErrorScreen
-        testID="profileErrorScreen"
-        title={profileError ? _(msg`Not Found`) : _(msg`Oops!`)}
-        message={cleanError(resolveError || profileError)}
-        onPressTryAgain={onPressTryAgain}
-        showHeader
-      />
+      <SafeAreaView style={[a.flex_1]}>
+        <ErrorScreen
+          testID="profileErrorScreen"
+          title={profileError ? _(msg`Not Found`) : _(msg`Oops!`)}
+          message={cleanError(resolveError || profileError)}
+          onPressTryAgain={onPressTryAgain}
+          showHeader
+        />
+      </SafeAreaView>
     )
   }
   if (profile && moderationOpts) {
@@ -144,13 +147,15 @@ function ProfileScreenInner({route}: Props) {
   }
   // should never happen
   return (
-    <ErrorScreen
-      testID="profileErrorScreen"
-      title="Oops!"
-      message="Something went wrong and we're not sure what."
-      onPressTryAgain={onPressTryAgain}
-      showHeader
-    />
+    <SafeAreaView style={[a.flex_1]}>
+      <ErrorScreen
+        testID="profileErrorScreen"
+        title="Oops!"
+        message="Something went wrong and we're not sure what."
+        onPressTryAgain={onPressTryAgain}
+        showHeader
+      />
+    </SafeAreaView>
   )
 }