From d13464df3dd6fa178d74a14c34fdad04c40e36a3 Mon Sep 17 00:00:00 2001 From: garronej Date: Mon, 27 Feb 2023 11:29:05 +0100 Subject: [PATCH] Get rid of the ReactComponent type, classes based component are no longer used --- src/lib/pages/shared/UserProfileCommons.tsx | 3 +-- src/lib/tools/ReactComponent.ts | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 src/lib/tools/ReactComponent.ts diff --git a/src/lib/pages/shared/UserProfileCommons.tsx b/src/lib/pages/shared/UserProfileCommons.tsx index b29fcf15..2eed1c0b 100644 --- a/src/lib/pages/shared/UserProfileCommons.tsx +++ b/src/lib/pages/shared/UserProfileCommons.tsx @@ -2,7 +2,6 @@ import React, { useEffect, Fragment } from "react"; import type { KcProps } from "../../KcProps"; import type { Attribute } from "../../getKcContext/KcContextBase"; import { clsx } from "../../tools/clsx"; -import type { ReactComponent } from "../../tools/ReactComponent"; import { useCallbackFactory } from "../../tools/useCallbackFactory"; import { useFormValidationSlice } from "../../useFormValidationSlice"; import type { I18nBase } from "../../i18n"; @@ -12,7 +11,7 @@ export type UserProfileFormFieldsProps = { kcContext: Param0["kcContext"]; i18n: I18nBase; } & KcProps & - Partial>> & { + Partial JSX.Element | null>> & { onIsFormSubmittableValueChange: (isFormSubmittable: boolean) => void; }; diff --git a/src/lib/tools/ReactComponent.ts b/src/lib/tools/ReactComponent.ts deleted file mode 100644 index fcef0123..00000000 --- a/src/lib/tools/ReactComponent.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* eslint-disable @typescript-eslint/ban-types */ -import type { FC, ComponentClass } from "react"; - -export type ReactComponent = {}> = ((props: Props) => ReturnType) | ComponentClass;