From 6174fcca46f50be04a48f02098cb049e94e455d3 Mon Sep 17 00:00:00 2001 From: Miqdad Date: Mon, 29 Sep 2025 12:18:09 +0700 Subject: --- src-migrate/modules/product-detail/components/Breadcrumb.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src-migrate/modules') diff --git a/src-migrate/modules/product-detail/components/Breadcrumb.tsx b/src-migrate/modules/product-detail/components/Breadcrumb.tsx index 0e263fe9..a0f983d0 100644 --- a/src-migrate/modules/product-detail/components/Breadcrumb.tsx +++ b/src-migrate/modules/product-detail/components/Breadcrumb.tsx @@ -10,12 +10,13 @@ type Props = { id: number; name: string }; const Breadcrumb = ({ id, name }: Props) => { const { isDesktop, isMobile } = useDevice(); - const { data: breadcrumbs = [] } = useQuery({ + const { data } = useQuery({ queryKey: ['product-category-breadcrumb', id], queryFn: () => getProductCategoryBreadcrumb(id), refetchOnWindowFocus: false, }); + const breadcrumbs = data ?? []; const total = breadcrumbs.length; const lastCat = total ? breadcrumbs[total - 1] : null; const hasHidden = total > 1; -- cgit v1.2.3