Fix TypeScript build errors

This commit is contained in:
gpt-engineer-app[bot]
2025-10-12 16:22:57 +00:00
parent 5637b37ebc
commit dd079bd5a5
12 changed files with 52 additions and 140 deletions

View File

@@ -55,9 +55,13 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }: C
...classNames,
}}
components={{
IconLeft: ({ ..._props }) => <ChevronLeft className="h-4 w-4" />,
IconRight: ({ ..._props }) => <ChevronRight className="h-4 w-4" />,
}}
Chevron: ({ orientation, ...props }: any) => {
if (orientation === 'left') {
return <ChevronLeft className="h-4 w-4" />;
}
return <ChevronRight className="h-4 w-4" />;
},
} as any}
{...props}
/>
);

View File

@@ -101,21 +101,21 @@ const ChartTooltipContent = React.forwardRef<
}
>(
(
{
active,
payload,
className,
indicator = "dot",
hideLabel = false,
hideIndicator = false,
label,
labelFormatter,
labelClassName,
formatter,
color,
nameKey,
labelKey,
},
{
active,
payload,
className,
indicator = "dot",
hideLabel = false,
hideIndicator = false,
label,
labelFormatter,
labelClassName,
formatter,
color,
nameKey,
labelKey,
}: any,
ref,
) => {
const { config } = useChart();
@@ -229,11 +229,12 @@ const ChartLegend = RechartsPrimitive.Legend;
const ChartLegendContent = React.forwardRef<
HTMLDivElement,
React.ComponentProps<"div"> &
Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
hideIcon?: boolean;
nameKey?: string;
}
React.ComponentProps<"div"> & {
hideIcon?: boolean;
nameKey?: string;
payload?: any[];
verticalAlign?: "top" | "bottom";
}
>(({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }, ref) => {
const { config } = useChart();
@@ -246,7 +247,7 @@ const ChartLegendContent = React.forwardRef<
ref={ref}
className={cn("flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className)}
>
{payload.map((item) => {
{payload.map((item: any) => {
const key = `${nameKey || item.dataKey || "value"}`;
const itemConfig = getPayloadConfigFromPayload(config, item, key);

View File

@@ -71,7 +71,7 @@ export function DatePicker({
onSelect={handleSelect}
disabled={getDisabledDates}
initialFocus
captionLayout="dropdown-buttons"
captionLayout="dropdown"
fromYear={fromYear}
toYear={toYear}
/>