aboutsummaryrefslogtreecommitdiff
path: root/src/components/ErrorBoundary.tsx
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-11-15 17:29:31 +0100
committerVendicated <vendicated@riseup.net>2022-11-15 17:29:31 +0100
commitb30508aef8cd19625640ee650b58b557bb3fdd24 (patch)
treea31ffe5d96f88e42c1d48881f4005a483618bb61 /src/components/ErrorBoundary.tsx
parenteabbf7d9bd9c2d011056918d8e23c5938c8d4f9b (diff)
downloadVencord-b30508aef8cd19625640ee650b58b557bb3fdd24.tar.gz
Vencord-b30508aef8cd19625640ee650b58b557bb3fdd24.tar.bz2
Vencord-b30508aef8cd19625640ee650b58b557bb3fdd24.zip
better handling for settings ui errors
Diffstat (limited to 'src/components/ErrorBoundary.tsx')
-rw-r--r--src/components/ErrorBoundary.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/ErrorBoundary.tsx b/src/components/ErrorBoundary.tsx
index 4429f72..86a5946 100644
--- a/src/components/ErrorBoundary.tsx
+++ b/src/components/ErrorBoundary.tsx
@@ -102,11 +102,11 @@ const ErrorBoundary = LazyComponent(() => {
};
}) as
React.ComponentType<React.PropsWithChildren<Props>> & {
- wrap<T extends JSX.IntrinsicAttributes = any>(Component: React.ComponentType<T>): React.ComponentType<T>;
+ wrap<T extends JSX.IntrinsicAttributes = any>(Component: React.ComponentType<T>, errorBoundaryProps?: Props): React.ComponentType<T>;
};
-ErrorBoundary.wrap = Component => props => (
- <ErrorBoundary>
+ErrorBoundary.wrap = (Component, errorBoundaryProps) => props => (
+ <ErrorBoundary {...errorBoundaryProps}>
<Component {...props} />
</ErrorBoundary>
);