Skip to content

Commit fac0e52

Browse files
committed
fix sector image
1 parent 3ddb04c commit fac0e52

File tree

1 file changed

+12
-10
lines changed
  • app/[locale]/(user)/sectors/[sectorSlug]

1 file changed

+12
-10
lines changed

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

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
'use client';
22

33
import React from 'react';
4+
import { fetchDatasets } from '@/fetch';
5+
import { graphql } from '@/gql';
46
import { useQuery } from '@tanstack/react-query';
7+
58
import { GraphQL } from '@/lib/api';
6-
import { graphql } from '@/gql';
7-
import { fetchDatasets } from '@/fetch';
89
import { ErrorPage } from '@/components/error';
910
import { Loading } from '@/components/loading';
1011
import ListingComponent from '../../components/ListingComponent';
@@ -20,15 +21,15 @@ const sectorQueryDoc = graphql(`
2021
}
2122
`);
2223

23-
const SectorDetailsPage = ({ params }: { params: { categorySlug: string } }) => {
24+
const SectorDetailsPage = ({
25+
params,
26+
}: {
27+
params: { categorySlug: string };
28+
}) => {
2429
const { data, isLoading, isError } = useQuery(
2530
[`get_category_details_${params.categorySlug}`],
2631
() =>
27-
GraphQL(
28-
sectorQueryDoc,
29-
{},
30-
{ filters: { slug: params.categorySlug } }
31-
)
32+
GraphQL(sectorQueryDoc, {}, { filters: { slug: params.categorySlug } })
3233
);
3334

3435
if (isError) return <ErrorPage />;
@@ -48,9 +49,10 @@ const SectorDetailsPage = ({ params }: { params: { categorySlug: string } }) =>
4849
breadcrumbData={breadcrumbData}
4950
categoryName={sector?.name}
5051
categoryDescription={sector?.description ?? undefined}
51-
categoryImage="/obi.jpg"
52+
categoryImage={`/Sectors/${sector.name}.svg`}
53+
5254
/>
5355
);
5456
};
5557

56-
export default SectorDetailsPage;
58+
export default SectorDetailsPage;

0 commit comments

Comments
 (0)