Overload 1 of 2, '(props: Props | Readonly<Props>): Legend', gave the following error.
Type '({ payload }: LegendProps) => JSX.Element' is not assignable to type 'ContentType | undefined'.
Type '({ payload }: LegendProps) => JSX.Element' is not assignable to type '(props: Props) => ReactNode'.
Types of parameters '__0' and 'props' are incompatible.
Type 'Props' is not assignable to type 'LegendProps'.
Types of property 'payload' are incompatible.
Type 'Payload[] | undefined' is not assignable to type 'Record<string, any>[]'.