1
0
Fork 1
mirror of https://github.com/Vendicated/Vencord.git synced 2025-01-09 09:26:22 +00:00

Use FunctionalComponent instead

This commit is contained in:
Nuckyz 2025-01-04 02:20:28 -03:00
parent 026cf357cc
commit abc669410a
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -20,7 +20,6 @@ import { Logger } from "@utils/Logger";
import { Margins } from "@utils/margins";
import { LazyComponent } from "@utils/react";
import { React } from "@webpack/common";
import { ReactElement } from "react";
import { ErrorCard } from "./ErrorCard";
@ -110,7 +109,7 @@ const ErrorBoundary = LazyComponent(() => {
};
}) as
React.ComponentType<React.PropsWithChildren<Props>> & {
wrap<T extends object = any>(Component: React.ComponentType<T>, errorBoundaryProps?: Omit<Props<T>, "wrappedProps">): (props: T) => ReactElement<any>;
wrap<T extends object = any>(Component: React.ComponentType<T>, errorBoundaryProps?: Omit<Props<T>, "wrappedProps">): React.FunctionComponent<T>;
};
ErrorBoundary.wrap = (Component, errorBoundaryProps) => props => (