Skip to content

Commit 96b78b8

Browse files
committed
Add cursor pointer for categories
1 parent e4a85c7 commit 96b78b8

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

components/Category/Categories.component.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { v4 as uuidv4 } from 'uuid';
66
* @param {Object} categories
77
*/
88
const 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
))}

utils/const/GQL_QUERIES.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,12 @@ export const FETCH_ALL_PRODUCTS_QUERY = gql`
107107
* Fetch all categories from GraphQL
108108
*/
109109
export 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
}

0 commit comments

Comments
 (0)