Skip to content

Commit 38f0467

Browse files
authored
Merge pull request #1498 from w3bdesign/develop
Refactor
2 parents d9824ab + f582969 commit 38f0467

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

components/Category/CategoryShowAll.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<template>
2-
<div v-if="data.productCategories">
2+
<div v-if="categories.productCategories">
33
<section class="bg-white">
44
<div class="flex justify-center align-middle flex-col md:flex-row">
5-
<template v-for="nodes in data.productCategories">
5+
<template v-for="nodes in categories.productCategories">
66
<template v-for="category in nodes">
77
<div v-if="category.slug !== undefined" :key="category.id">
88
<NuxtLink
@@ -34,7 +34,7 @@
3434

3535
<script setup>
3636
const props = defineProps({
37-
data: {
37+
categories: {
3838
type: Object,
3939
required: true
4040
}

pages/categories.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<template>
22
<div class="flex justify-center items-center">
3-
<CategoryShowAll :data="data" />
3+
<CategoryShowAll :categories="categories" />
44
</div>
55
</template>
66

77
<script setup>
88
import FETCH_ALL_CATEGORIES_QUERY from "@/apollo/queries/FETCH_ALL_CATEGORIES_QUERY.gql";
99
const variables = { limit: 99 };
10-
const { data } = await useAsyncQuery(FETCH_ALL_CATEGORIES_QUERY, variables);
10+
const { data: categories } = await useAsyncQuery(FETCH_ALL_CATEGORIES_QUERY, variables);
1111
1212
useHead({
1313
title: "Categories",

0 commit comments

Comments
 (0)