From 587da21975ed33e967da501770ea2cc2326f34fd Mon Sep 17 00:00:00 2001 From: CharisN Date: Wed, 18 Dec 2024 16:45:20 +0200 Subject: [PATCH] Fix: docker-compose-npm-error -Simplified the type of children to just React.ReactNode, which is the standard type for React components' children prop. --- client/components/card/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/components/card/index.tsx b/client/components/card/index.tsx index 028f368e2..1d2f61be8 100644 --- a/client/components/card/index.tsx +++ b/client/components/card/index.tsx @@ -1,8 +1,9 @@ import React from "react"; + function Card(props: { className?: string; extra?: string; - children?: React.ReactNode | Element; + children?: React.ReactNode; // Simplified type default?: boolean; }) { const { extra, children, ...rest } = props; @@ -11,7 +12,7 @@ function Card(props: { className={`!z-5 relative flex flex-col rounded-[20px] shadow-[rgba(0, 0, 0, 0.2)] shadow-md border border-gray-100 dark:border-none dark:shadow-none bg-clip-border dark:!bg-darkMain dark:text-white ${extra}`} {...rest} > - <>{children} + {children} {/* Removed unnecessary fragment */} ); }