Fix build errors and TypeScript issues

- Install missing UI component dependencies
- Fix unused imports in React components
- Remove version numbers from all import statements
- Fix TypeScript errors in calendar and chart components
- Build now succeeds with production bundle generated
This commit is contained in:
Your Name
2025-10-24 18:52:34 -07:00
parent c097c7fe54
commit e69c6ae5be
37 changed files with 1237 additions and 55 deletions

View File

@@ -1,7 +1,7 @@
"use client";
import * as React from "react";
import * as RechartsPrimitive from "recharts@2.15.2";
import * as RechartsPrimitive from "recharts";
import { cn } from "./utils";
@@ -125,6 +125,8 @@ function ChartTooltipContent({
indicator?: "line" | "dot" | "dashed";
nameKey?: string;
labelKey?: string;
payload?: any[];
label?: any;
}) {
const { config } = useChart();
@@ -179,7 +181,7 @@ function ChartTooltipContent({
>
{!nestLabel ? tooltipLabel : null}
<div className="grid gap-1.5">
{payload.map((item, index) => {
{payload.map((item: any, index: number) => {
const key = `${nameKey || item.name || item.dataKey || "value"}`;
const itemConfig = getPayloadConfigFromPayload(config, item, key);
const indicatorColor = color || item.payload.fill || item.color;
@@ -256,11 +258,12 @@ function ChartLegendContent({
payload,
verticalAlign = "bottom",
nameKey,
}: React.ComponentProps<"div"> &
Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
hideIcon?: boolean;
nameKey?: string;
}) {
}: React.ComponentProps<"div"> & {
hideIcon?: boolean;
nameKey?: string;
payload?: any[];
verticalAlign?: "top" | "bottom";
}) {
const { config } = useChart();
if (!payload?.length) {
@@ -275,7 +278,7 @@ function ChartLegendContent({
className,
)}
>
{payload.map((item) => {
{payload.map((item: any) => {
const key = `${nameKey || item.dataKey || "value"}`;
const itemConfig = getPayloadConfigFromPayload(config, item, key);