Get rid of the ReactComponent type, classes based component are no longer used

This commit is contained in:
garronej 2023-02-27 11:29:05 +01:00
parent 6bde2e4d96
commit d13464df3d
2 changed files with 1 additions and 6 deletions

View File

@ -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<typeof useFormValidationSlice>["kcContext"];
i18n: I18nBase;
} & KcProps &
Partial<Record<"BeforeField" | "AfterField", ReactComponent<{ attribute: Attribute }>>> & {
Partial<Record<"BeforeField" | "AfterField", (props: { attribute: Attribute }) => JSX.Element | null>> & {
onIsFormSubmittableValueChange: (isFormSubmittable: boolean) => void;
};

View File

@ -1,4 +0,0 @@
/* eslint-disable @typescript-eslint/ban-types */
import type { FC, ComponentClass } from "react";
export type ReactComponent<Props extends Record<string, unknown> = {}> = ((props: Props) => ReturnType<FC>) | ComponentClass<Props>;