mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-11-03 03:18:52 +00:00
React.lazy expects default exports, but all finance registry files were using named exports. This caused build failures with the error: "Element type is invalid: expected a string ... but got: undefined" Changes: - Updated all finance registry files to import and re-export as default - Removed non-existent mini-chart and symbol-overview MDX files - Updated sidebar navigation to remove mini-chart and symbol-overview - Fixed market-overview, ticker-tape, and trading-panel registry files The finance components now properly load in ComponentPreview during static site generation.
10 lines
2.2 KiB
JSON
10 lines
2.2 KiB
JSON
{
|
|
"name": "gantt",
|
|
"files": [
|
|
{
|
|
"name": "gantt.tsx",
|
|
"content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nexport interface GanttProps extends React.HTMLAttributes<HTMLDivElement> {\n tasks?: Array<{\n id: string\n name: string\n start: Date\n end: Date\n progress?: number\n }>\n}\n\nconst Gantt = React.forwardRef<HTMLDivElement, GanttProps>(\n ({ className, tasks = [], ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n \"rounded-lg border bg-card text-card-foreground shadow-sm\",\n className\n )}\n {...props}\n >\n <div className=\"p-6\">\n <div className=\"space-y-4\">\n {tasks.length === 0 ? (\n <div className=\"flex items-center justify-center p-8\">\n <p className=\"text-sm text-muted-foreground\">\n No tasks available. Add tasks to display Gantt chart.\n </p>\n </div>\n ) : (\n tasks.map((task) => (\n <div key={task.id} className=\"space-y-2\">\n <div className=\"flex items-center justify-between text-sm\">\n <span className=\"font-medium\">{task.name}</span>\n <span className=\"text-muted-foreground\">\n {task.progress ?? 0}%\n </span>\n </div>\n <div className=\"h-8 rounded-md bg-muted\">\n <div\n className=\"h-full rounded-md bg-primary\"\n style={{ width: `${task.progress ?? 0}%` }}\n />\n </div>\n <div className=\"flex justify-between text-xs text-muted-foreground\">\n <span>{task.start.toLocaleDateString()}</span>\n <span>{task.end.toLocaleDateString()}</span>\n </div>\n </div>\n ))\n )}\n </div>\n </div>\n </div>\n )\n }\n)\n\nGantt.displayName = \"Gantt\"\n\nexport { Gantt }\n"
|
|
}
|
|
],
|
|
"type": "components:ui"
|
|
} |