Skip to content

Commit 644dc2e

Browse files
committed
feat(frontend): add industries cards
1 parent 2a1857a commit 644dc2e

File tree

3 files changed

+66
-0
lines changed

3 files changed

+66
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import clsx from "clsx";
2+
import Image from "next/image";
3+
4+
import { request } from "@/utils/graphQLClient";
5+
6+
import { industriesQuery, IIndustriesQuery } from "./queries";
7+
8+
const Industries: React.FC = async () => {
9+
const industriesData = await request<IIndustriesQuery>(industriesQuery);
10+
11+
return (
12+
<div className="flex flex-wrap gap-6 lg:mx-32">
13+
{industriesData.enterprise.industries.map(({ title, icon }) => (
14+
<div
15+
className={clsx(
16+
"flex flex-1 flex-col items-center rounded-2xl border",
17+
"border-stroke p-6",
18+
)}
19+
key={title}
20+
>
21+
<Image
22+
className="mx-10"
23+
src={icon.url}
24+
alt={title + " card image"}
25+
width="72"
26+
height="72"
27+
/>
28+
<p className="mx-auto w-max text-lg text-primary-text lg:text-xl">
29+
{title}
30+
</p>
31+
</div>
32+
))}
33+
</div>
34+
);
35+
};
36+
37+
export default Industries;
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { gql } from "graphql-request";
2+
3+
export const industriesQuery = gql`
4+
{
5+
enterprise {
6+
industries {
7+
title
8+
icon {
9+
url
10+
}
11+
}
12+
}
13+
}
14+
`;
15+
16+
export type IIndustriesQuery = {
17+
enterprise: {
18+
industries: Array<{
19+
title: string;
20+
icon: {
21+
url: string;
22+
};
23+
}>;
24+
};
25+
};

frontend/src/app/enterprise/components/KlerosEnterpriseSection/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
import Card from "../Card";
1111

1212
import DisputeResolutionProcess from "./DisputeResolutionProcess";
13+
import Industries from "./Industries";
1314
import LemonCashSection from "./LemonCashSection";
1415
import MethodsTable from "./MethodsTable";
1516

@@ -47,6 +48,9 @@ const KlerosEnterpriseSection: React.FC = async () => {
4748
/>
4849

4950
<LemonCashSection />
51+
52+
<Industries />
53+
5054
<div className="mx-auto lg:px-32">
5155
<ExternalLink url={arrowLink.link.url} text={arrowLink.text} />
5256
</div>

0 commit comments

Comments
 (0)