From 07601befd47e1842a6a43c7ec84e8af177a9f61e Mon Sep 17 00:00:00 2001 From: SaharPak Date: Mon, 15 Jun 2026 10:03:25 +0000 Subject: [PATCH] chore: type product builder parsing Annotate ProductCard's builder normalization so JSON parsing does not leak an implicit any. Co-authored-by: Sahar --- src/components/product-card.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/product-card.tsx b/src/components/product-card.tsx index 307c811..9c0799f 100644 --- a/src/components/product-card.tsx +++ b/src/components/product-card.tsx @@ -3,16 +3,16 @@ import Link from "next/link"; import { VoteButton } from "./vote-button"; import { StageDot } from "./stage-dot"; -import type { ProductWithCounts } from "@/types/database"; +import type { ProductBuilder, ProductWithCounts } from "@/types/database"; interface ProductCardProps { product: ProductWithCounts; } export function ProductCard({ product }: ProductCardProps) { - const builder = + const builder: ProductBuilder = typeof product.builder === "string" - ? JSON.parse(product.builder) + ? (JSON.parse(product.builder) as ProductBuilder) : product.builder; return (