Files
zeekay ba3f2091a4 fix: Resolve production TypeScript errors (billing, qr-code, reveal-animation, charts)
- Fixed qr-code.tsx: Use inline QRCodeImageSettings type with cast to any
- Fixed reveal-animation.tsx: Change threshold → amount for motion/react API
- Fixed chart-bar-active.tsx: Remove invalid activeIndex prop from Bar component
- Fixed payment-settings-01.tsx: Add explicit types to callback parameters
- Created billing stub module in both default and new-york variants
- Fixed billing imports: Changed @hanzo/ui/billing → @/registry/new-york/ui/billing
- All billing import errors resolved

Production errors fixed: ~20
Remaining: 27 errors (14 billing mock data, 13 recharts types - lower priority)
2025-11-05 23:52:41 -08:00

56 lines
1.4 KiB
TypeScript

"use client"
import Link from "next/link"
import { usePathname } from "next/navigation"
import { registryCategories } from "@/lib/categories"
import { ScrollArea, ScrollBar } from "@/registry/default/ui/scroll-area"
export function BlocksNav() {
const pathname = usePathname()
return (
<div className="relative overflow-hidden">
<ScrollArea className="max-w-none">
<div className="flex items-center">
<BlocksNavLink
category={{ name: "Featured", slug: "", hidden: false }}
isActive={pathname === "/blocks"}
/>
{registryCategories.map((category) => (
<BlocksNavLink
key={category.slug}
category={category}
isActive={pathname === `/blocks/${category.slug}`}
/>
))}
</div>
<ScrollBar orientation="horizontal" className="invisible" />
</ScrollArea>
</div>
)
}
function BlocksNavLink({
category,
isActive,
}: {
category: (typeof registryCategories)[number]
isActive: boolean
}) {
if (category.hidden) {
return null
}
return (
<Link
href={`/blocks/${category.slug}`}
key={category.slug}
className="text-muted-foreground hover:text-primary data-[active=true]:text-primary flex h-7 items-center justify-center px-4 text-center text-base font-medium transition-colors"
data-active={isActive}
>
{category.name}
</Link>
)
}