category , subcategory, product url changes
This commit is contained in:
@@ -14,7 +14,8 @@ const cleanHTML = (html) => {
|
||||
|
||||
const CategoryHero = ({ params }) => {
|
||||
const { category } = useContext(ProductContext);
|
||||
const selectedCategory = category?.find((cat) => cat.id == params.id);
|
||||
const selectedCategory = category?.find((cat) => cat.category_name.toLowerCase() ===
|
||||
decodeURIComponent(params.name).toLowerCase());
|
||||
|
||||
console.log(selectedCategory);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user