import { getBlock } from "@/lib/blocks" import { cn } from "@/lib/utils" import { ChartToolbar } from "@/components/chart-toolbar" export async function ChartDisplay({ name, children, className, }: { name: string } & React.ComponentProps<"div">) { const chart = await getBlock(name) // Cannot (and don't need to) pass to the client. delete chart?.component delete chart?.chunks if (!chart) { return null } return (
{children}
{children}
) }