From abc669410ac68885189f8b97313f892941409a2b Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sat, 4 Jan 2025 02:20:28 -0300 Subject: [PATCH] Use FunctionalComponent instead --- src/components/ErrorBoundary.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/ErrorBoundary.tsx b/src/components/ErrorBoundary.tsx index 3d603b919..60ff1faf2 100644 --- a/src/components/ErrorBoundary.tsx +++ b/src/components/ErrorBoundary.tsx @@ -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> & { - wrap(Component: React.ComponentType, errorBoundaryProps?: Omit, "wrappedProps">): (props: T) => ReactElement; + wrap(Component: React.ComponentType, errorBoundaryProps?: Omit, "wrappedProps">): React.FunctionComponent; }; ErrorBoundary.wrap = (Component, errorBoundaryProps) => props => (