File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { v4 as uuidv4 } from 'uuid';
66 * @param {Object } categories
77 */
88const Categories = ( { categories } ) => {
9+
910 return (
1011 < >
1112
@@ -16,10 +17,11 @@ const Categories = ({ categories }) => {
1617 { categories . map ( ( { name } ) => (
1718 < div
1819 key = { uuidv4 ( ) }
19- className = "flex flex-col justify-around p-6 xs:w-1/2 md:w-1/3 xl:w-1/4"
20+ className = "flex flex-col justify-around p-6 cursor-pointer xs:w-1/2 md:w-1/3 xl:w-1/4"
2021 >
2122 < div className = "flex items-center justify-center w-full h-16 text-center border border-gray-300 rounded-lg shadow hover:shadow-outline" >
2223 < p className = "text-lg" > { name } </ p >
24+
2325 </ div >
2426 </ div >
2527 ) ) }
Original file line number Diff line number Diff line change @@ -107,10 +107,12 @@ export const FETCH_ALL_PRODUCTS_QUERY = gql`
107107 * Fetch all categories from GraphQL
108108 */
109109export const FETCH_ALL_CATEGORIES_QUERY = gql `
110- query MyQuery {
111- productCategories {
110+ query Categories {
111+ productCategories(first: 10) {
112112 nodes {
113+ id
113114 name
115+ slug
114116 }
115117 }
116118 }
You can’t perform that action at this time.
0 commit comments