Skip to content

Commit

Permalink
fix: docker-compose-npm-error (#1486)
Browse files Browse the repository at this point in the history
-Simplified the type of children to just React.ReactNode, which is the standard type for React components' children prop.
  • Loading branch information
Charisn authored Dec 19, 2024
1 parent 68b6557 commit daf5696
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client/components/card/index.tsx
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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 */}
</div>
);
}
Expand Down

0 comments on commit daf5696

Please sign in to comment.