Skip to content

Commit 1d1a953

Browse files
committed
fix: update query to use activeSectors instead of sectors in Sectors and SectorsListingPage components
1 parent 7386b6d commit 1d1a953

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/[locale]/(user)/components/Sectors.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { GraphQL } from '@/lib/api';
1313

1414
const sectorDetails = graphql(`
1515
query SectorsList {
16-
sectors {
16+
activeSectors {
1717
id
1818
name
1919
description
@@ -61,7 +61,7 @@ const Sectors = () => {
6161
</div>
6262
) : (
6363
<div className="mt-12 grid w-full grid-cols-1 gap-6 px-4 md:grid-cols-2 md:px-12 lg:grid-cols-3 lg:px-12">
64-
{data?.sectors.map((sectors: any) => (
64+
{data?.activeSectors.map((sectors: any) => (
6565
<Link
6666
href={`/sectors/${sectors.slug}?size=9&page=1&sort=recent&sectors=${capitalizeWords(sectors.slug)}`}
6767
key={sectors.id}

app/[locale]/(user)/sectors/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import Styles from '../datasets/dataset.module.scss';
2020

2121
const sectorsListQueryDoc: any = graphql(`
2222
query SectorsLists($order: SectorOrder, $filters: SectorFilter) {
23-
sectors(order: $order, filters: $filters) {
23+
activeSectors(order: $order, filters: $filters) {
2424
id
2525
name
2626
description
@@ -185,10 +185,10 @@ const SectorsListingPage = () => {
185185
<div className="m-4 flex justify-center">
186186
<Spinner />
187187
</div>
188-
) : data && data?.sectors?.length > 0 ? (
188+
) : data && data?.activeSectors?.length > 0 ? (
189189
<>
190190
<div className="grid w-full grid-cols-1 gap-10 md:grid-cols-2 lg:grid-cols-3">
191-
{data?.sectors.map((sectors: any) => (
191+
{data?.activeSectors.map((sectors: any) => (
192192
<Link
193193
href={`/sectors/${sectors.slug}?sectors=${capitalizeWords(sectors.slug)}`}
194194
key={sectors.id}

0 commit comments

Comments
 (0)