mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-10-15 19:45:42 -04:00
chore(native): define the root error fallback outside RootLayout
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 file changed
+5
-1
@@ -207,6 +207,10 @@ function QueryProvider({ children }: { children: React.ReactNode }) {
|
||||
return <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>;
|
||||
}
|
||||
|
||||
const renderRootErrorFallback = ({ resetError }: { resetError: () => void }) => (
|
||||
<RootErrorFallback resetError={resetError} />
|
||||
);
|
||||
|
||||
function RootLayout() {
|
||||
const inner = (
|
||||
<I18nProvider i18n={i18n}>
|
||||
@@ -224,7 +228,7 @@ function RootLayout() {
|
||||
|
||||
const guarded = (
|
||||
<Sentry.ErrorBoundary
|
||||
fallback={({ resetError }) => <RootErrorFallback resetError={resetError} />}
|
||||
fallback={renderRootErrorFallback}
|
||||
onError={(error) => {
|
||||
posthog?.captureException(error, { source: "error-boundary" });
|
||||
}}
|
||||
|
||||
Reference in new issue
Block a user