From 5e3f9b72361159da57c072cafed44424184d57f5 Mon Sep 17 00:00:00 2001 From: pylixonly <82711525+pylixonly@users.noreply.github.com> Date: Sat, 9 Nov 2024 17:03:06 +0800 Subject: [PATCH] fix: wrap ErrorBoundaryScreen with SafeAreaProvider --- .../components/ErrorBoundaryScreen.tsx | 38 ++++++++++--------- src/metro/common/components.ts | 2 +- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/core/ui/reporter/components/ErrorBoundaryScreen.tsx b/src/core/ui/reporter/components/ErrorBoundaryScreen.tsx index 124d665..7ff7c18 100644 --- a/src/core/ui/reporter/components/ErrorBoundaryScreen.tsx +++ b/src/core/ui/reporter/components/ErrorBoundaryScreen.tsx @@ -5,7 +5,7 @@ import { settings } from "@lib/api/settings"; import { Codeblock, ErrorBoundary } from "@lib/ui/components"; import { createStyles } from "@lib/ui/styles"; import { tokens } from "@metro/common"; -import { Button, Card, SafeAreaView, Text } from "@metro/common/components"; +import { Button, Card, SafeAreaProvider, SafeAreaView, Text } from "@metro/common/components"; import { ScrollView, View } from "react-native"; import ErrorComponentStackCard from "./ErrorComponentStackCard"; @@ -31,22 +31,24 @@ export default function ErrorBoundaryScreen(props: { const debugInfo = getDebugInfo(); return - - - Uh oh. - A crash occurred while rendering a component. This could be caused by a plugin, Bunny or Discord itself. - {debugInfo.os.name}; {debugInfo.discord.build} ({debugInfo.discord.version}); {debugInfo.bunny.version} - - - {props.error.message} - {hasStack(props.error) && } - {isComponentStack(props.error) ? : null} - - -