Skip to content

Commit 26e7906

Browse files
committed
feat: add pnk token section
1 parent 323a1df commit 26e7906

File tree

3 files changed

+74
-13
lines changed

3 files changed

+74
-13
lines changed

frontend/src/app/brand-assets/page.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ import KlerosColorsSection from "@/components/BrandAssets/KlerosColorsSection/in
44
import KlerosFontsSection from "@/components/BrandAssets/KlerosFontsSection";
55
import KlerosLogoSection from "@/components/BrandAssets/KlerosLogoSection";
66
import LogosPackageSection from "@/components/BrandAssets/LogosPackageSection";
7+
import PnkTokenSection from "@/components/BrandAssets/PnkTokenSection";
78
import StyledImagesSection from "@/components/BrandAssets/StyledImagesSection";
89
import { heroQuery, HeroQueryType } from "@/queries/brand-assets/hero";
10+
import {
11+
klerosBadgesSectionQuery,
12+
KlerosBadgesSectionQueryType,
13+
} from "@/queries/brand-assets/kleros-badges-section";
914
import {
1015
klerosColorsSectionQuery,
1116
KlerosColorsSectionQueryType,
@@ -23,22 +28,15 @@ import {
2328
LogosPackageSectionQueryType,
2429
} from "@/queries/brand-assets/logos-package-section";
2530
import {
26-
klerosBadgesSectionQuery,
27-
KlerosBadgesSectionQueryType,
28-
} from "@/queries/brand-assets/kleros-badges-section";
31+
pnkTokenSectionQuery,
32+
PnkTokenSectionQueryType,
33+
} from "@/queries/brand-assets/pnk-token-section";
2934
import {
3035
styledImagesSectionQuery,
3136
StyledImagesSectionQueryType,
3237
} from "@/queries/brand-assets/styled-images-section";
33-
// import {
34-
// pnkTokenSectionQuery,
35-
// PnkTokenSectionQueryType,
36-
// } from "@/queries/brand-assets/pnk-token-section";
37-
3838
import { request } from "@/utils/graphQLClient";
3939

40-
// import PnkTokenSection from "@/components/BrandAssets/PnkTokenSection";
41-
4240
const BrandAssets: React.FC = async () => {
4341
const heroData = await request<HeroQueryType>(heroQuery);
4442
const logosPackageData = await request<LogosPackageSectionQueryType>(
@@ -59,9 +57,8 @@ const BrandAssets: React.FC = async () => {
5957
const styledImagesSection = await request<StyledImagesSectionQueryType>(
6058
styledImagesSectionQuery,
6159
);
62-
// const pnkTokenSection = await request<PnkTokenSectionQueryType>(
63-
// pnkTokenSectionQuery,
64-
// );
60+
const pnkTokenSection =
61+
await request<PnkTokenSectionQueryType>(pnkTokenSectionQuery);
6562

6663
return (
6764
<>
@@ -90,6 +87,9 @@ const BrandAssets: React.FC = async () => {
9087
styledImagesSection.brandAssetsPageStyledImagesSection
9188
}
9289
/>
90+
<PnkTokenSection
91+
pnkTokenData={pnkTokenSection.brandAssetsPagePnkTokenSection}
92+
/>
9393
</>
9494
);
9595
};
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { PnkTokenSectionQueryType } from "@/queries/brand-assets/pnk-token-section";
2+
3+
import ImageDownload from "../ImageDownload";
4+
5+
interface IPnkTokenSection {
6+
pnkTokenData: PnkTokenSectionQueryType["brandAssetsPagePnkTokenSection"];
7+
}
8+
9+
const PnkTokenSection: React.FC<IPnkTokenSection> = ({ pnkTokenData }) => {
10+
return (
11+
<div className="relative bg-background-1 px-6 pb-12 pt-32">
12+
<div className="space-y-6">
13+
<h1 className="w-min text-3xl">{pnkTokenData.header}</h1>
14+
<p className="text-lg text-secondary-text">{pnkTokenData.subtitle}</p>
15+
<div className="flex flex-row flex-wrap gap-x-8 gap-y-16">
16+
<ImageDownload
17+
key={pnkTokenData.imageDownload.name}
18+
{...{ imageDownload: pnkTokenData.imageDownload }}
19+
/>
20+
</div>
21+
</div>
22+
</div>
23+
);
24+
};
25+
26+
export default PnkTokenSection;
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { gql } from "graphql-request";
2+
3+
export const pnkTokenSectionQuery = gql`
4+
{
5+
brandAssetsPagePnkTokenSection {
6+
header
7+
subtitle
8+
imageDownload {
9+
name
10+
image {
11+
url
12+
}
13+
svgDownloadLink
14+
pngDownloadLink
15+
}
16+
}
17+
}
18+
`;
19+
20+
export type PnkTokenSectionQueryType = {
21+
brandAssetsPagePnkTokenSection: {
22+
header: string;
23+
subtitle: string;
24+
imageDownload: ImageDownloadType;
25+
};
26+
};
27+
28+
export type ImageDownloadType = {
29+
name: string;
30+
image: {
31+
url: string;
32+
};
33+
svgDownloadLink?: string;
34+
pngDownloadLink?: string;
35+
};

0 commit comments

Comments
 (0)