Skip to content

Commit

Permalink
Fixed missing dependency for hooks in breadcrumb components
Browse files Browse the repository at this point in the history
  • Loading branch information
pranav-kural committed Sep 24, 2024
1 parent db069f1 commit 69f4ea6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/components/header/breadcrumb/CategoryPart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const BreadcrumbCategoryPart: FC<BreadcrumbCategoryPartProps> = ({
}

return null;
}, [categoryFetch, categoryId]);
}, [categoryFetch, categoryId, user]);

// Log error if any occurs during fetching data
useMemo(() => {
Expand Down
2 changes: 1 addition & 1 deletion app/components/header/breadcrumb/ProductPart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const BreadcrumbProductPart: FC<BreadcrumbProductPartProps> = ({
}

return null;
}, [productFetch, categoryId, subCategoryId, productId]);
}, [productFetch, categoryId, subCategoryId, productId, user]);

// Log error if any occurs during fetching data
useMemo(() => {
Expand Down
2 changes: 1 addition & 1 deletion app/components/header/breadcrumb/SubCategoryPart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const BreadcrumbSubCategortPart: FC<BreadcrumbSubCategortPartProps> = ({
}

return null;
}, [subCategoryFetch, categoryId, subCategoryId]);
}, [subCategoryFetch, categoryId, subCategoryId, user]);

// Log error if any occurs during fetching data
useMemo(() => {
Expand Down

0 comments on commit 69f4ea6

Please # to comment.