From 791580b850357ba58a3a30caa657ed751ceed5ac Mon Sep 17 00:00:00 2001 From: Alireza Hassani Date: Sat, 3 Oct 2026 23:34:44 +0330 Subject: [PATCH] Fix production TypeScript errors blocking dashboard build Co-authored-by: Cursor --- components/BlogCategoriesPage.tsx | 5 +++-- types/business.ts | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/components/BlogCategoriesPage.tsx b/components/BlogCategoriesPage.tsx index a211ccf..d92ec59 100644 --- a/components/BlogCategoriesPage.tsx +++ b/components/BlogCategoriesPage.tsx @@ -127,10 +127,11 @@ export default function BlogCategoriesPage() { }, [categories]); const parentOptions = useMemo(() => { - const source = !draft?.id + const draftId = draft?.id; + const source = !draftId ? categories : categories.filter( - (item) => !collectDescendantIds(draft.id, categories).has(item.id), + (item) => !collectDescendantIds(draftId, categories).has(item.id), ); return toTreeSelect(source); }, [categories, draft?.id]); diff --git a/types/business.ts b/types/business.ts index ee70c2c..1d3b8c9 100644 --- a/types/business.ts +++ b/types/business.ts @@ -14,6 +14,8 @@ export interface MarketplaceBusiness { isFeatured: boolean; sortWeight: number; publishedAt: string | null; + createdAt?: string; + updatedAt?: string; /** Enriched client-side from Meshkee when available */ name?: string; categoryName?: string;