From 69f4ea6ca95f806ea24dca4af5c3cee0b0bff887 Mon Sep 17 00:00:00 2001 From: pranav-kural Date: Tue, 24 Sep 2024 01:25:38 -0400 Subject: [PATCH] Fixed missing dependency for hooks in breadcrumb components --- app/components/header/breadcrumb/CategoryPart.tsx | 2 +- app/components/header/breadcrumb/ProductPart.tsx | 2 +- app/components/header/breadcrumb/SubCategoryPart.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/components/header/breadcrumb/CategoryPart.tsx b/app/components/header/breadcrumb/CategoryPart.tsx index c01c94d..ef4150a 100644 --- a/app/components/header/breadcrumb/CategoryPart.tsx +++ b/app/components/header/breadcrumb/CategoryPart.tsx @@ -52,7 +52,7 @@ export const BreadcrumbCategoryPart: FC = ({ } return null; - }, [categoryFetch, categoryId]); + }, [categoryFetch, categoryId, user]); // Log error if any occurs during fetching data useMemo(() => { diff --git a/app/components/header/breadcrumb/ProductPart.tsx b/app/components/header/breadcrumb/ProductPart.tsx index acfe380..07cbbe6 100644 --- a/app/components/header/breadcrumb/ProductPart.tsx +++ b/app/components/header/breadcrumb/ProductPart.tsx @@ -52,7 +52,7 @@ export const BreadcrumbProductPart: FC = ({ } return null; - }, [productFetch, categoryId, subCategoryId, productId]); + }, [productFetch, categoryId, subCategoryId, productId, user]); // Log error if any occurs during fetching data useMemo(() => { diff --git a/app/components/header/breadcrumb/SubCategoryPart.tsx b/app/components/header/breadcrumb/SubCategoryPart.tsx index eabcb33..c3ff79a 100644 --- a/app/components/header/breadcrumb/SubCategoryPart.tsx +++ b/app/components/header/breadcrumb/SubCategoryPart.tsx @@ -49,7 +49,7 @@ export const BreadcrumbSubCategortPart: FC = ({ } return null; - }, [subCategoryFetch, categoryId, subCategoryId]); + }, [subCategoryFetch, categoryId, subCategoryId, user]); // Log error if any occurs during fetching data useMemo(() => {