mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-16 18:07:02 -04:00
parent
e563521416
commit
74c3930e0a
41 changed files with 141 additions and 87 deletions
|
@ -15,7 +15,7 @@ const NO_ERROR = {};
|
|||
|
||||
export default class ErrorBoundary extends React.Component<React.PropsWithChildren<Props>> {
|
||||
static wrap<T = any>(Component: React.ComponentType<T>): (props: T) => React.ReactElement {
|
||||
return (props) => (
|
||||
return props => (
|
||||
<ErrorBoundary>
|
||||
<Component {...props as any/* I hate react typings ??? */} />
|
||||
</ErrorBoundary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue