feat: add home categories link

:%s
This commit is contained in:
lytrankieio123 2021-08-27 10:39:13 +07:00
parent 18979cf33d
commit 44f7633f35

View File

@ -1,5 +1,6 @@
import classNames from 'classnames'; import classNames from 'classnames';
import React from 'react'; import React from 'react';
import { QUERY_KEY, ROUTE } from 'src/utils/constanst.utils';
import HeadingCommon from "../../../common/HeadingCommon/HeadingCommon"; import HeadingCommon from "../../../common/HeadingCommon/HeadingCommon";
import CategoryItem from './CategoriesItem/CategoryItem'; import CategoryItem from './CategoriesItem/CategoryItem';
import s from './HomeCategories.module.scss'; import s from './HomeCategories.module.scss';
@ -15,30 +16,30 @@ const categories = [
id: 1, id: 1,
image: veggle, image: veggle,
name: "Veggie", name: "Veggie",
link: "veggie.html" link: `${ROUTE.PRODUCTS}?${QUERY_KEY.CATEGORY}=veggie`
}, { }, {
id: 2, id: 2,
image: seafood, image: seafood,
name: "Seafood", name: "Seafood",
link: "seafood.html" link: `${ROUTE.PRODUCTS}?${QUERY_KEY.CATEGORY}=seafood`
} }
, { , {
id: 3, id: 3,
image: frozen, image: frozen,
name: "Frozen", name: "Frozen",
link: "frozen.html" link: `${ROUTE.PRODUCTS}?${QUERY_KEY.CATEGORY}=frozen`
} }
, { , {
id: 4, id: 4,
image: coffeebean, image: coffeebean,
name: "Coffe Bean", name: "Coffe Bean",
link: "frozen.html" link: `${ROUTE.PRODUCTS}?${QUERY_KEY.CATEGORY}=coffee-bean`
} }
, { , {
id: 5, id: 5,
image: sauce, image: sauce,
name: "Sauce", name: "Sauce",
link: "frozen.html" link: `${ROUTE.PRODUCTS}?${QUERY_KEY.CATEGORY}=sauce`,
} }
] ]
@ -56,7 +57,6 @@ const HomeCategories = () => {
name={item.name} name={item.name}
image={item.image} image={item.image}
link={item.link} link={item.link}
/> />
</div> </div>
))} ))}