-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathdemocracy.tsx
More file actions
84 lines (74 loc) · 2.11 KB
/
Copy pathdemocracy.tsx
File metadata and controls
84 lines (74 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
'use client';
import {
EditoCard,
Kpis,
PartnersBlock,
ThematicHeroBlock,
ThematicsBlock,
ThumbnailProjectsBlock,
} from '@/components';
import {
transformProjects,
transformKpis,
transformPartners,
transformThematics,
} from '@/lib/formatters/thematics';
import { useTranslations } from 'next-intl';
import { ThematicPageData , ThematicsData} from './page';
type ThematicsProps = {
data: ThematicPageData;
thematicsData: ThematicsData;
}
export default function SocialPage({ data, thematicsData }: ThematicsProps) {
const t = useTranslations('democracy');
const partners = transformPartners(data.thematic?.funders);
const kpis = transformKpis(data.thematic?.kpis);
const projects = transformProjects(data.thematic?.projects);
const thematics = transformThematics(thematicsData);
return (
<>
<ThematicHeroBlock
title={t('title')}
image={data.thematic?.banner_image?.url || ''}
imageCredit={data.thematic?.banner_image?.caption ?? null}
className="my-lg"
/>
<Kpis kpis={kpis} className="my-lg" />
<EditoCard
imageText={data.thematic?.quote || ''}
image={data.thematic?.image_1?.url || ''}
imageCredit={data.thematic?.image_1?.caption ?? null}
imagePosition="left"
imageTextRotation={-6}
className="my-lg container"
contentClassName="lead"
>
{data.thematic?.description || ''}
</EditoCard>
<EditoCard
imageText={data.thematic?.quote2 || ''}
image={data.thematic?.image_2?.url || ''}
imageCredit={data.thematic?.image_2?.caption ?? null}
className="my-lg container"
contentClassName="lead"
>
{data.thematic?.description_2}
</EditoCard>
<ThumbnailProjectsBlock
title={t('projectsTitle')}
projects={projects}
className="my-lg"
/>
<PartnersBlock
title={t('partners')}
partners={partners}
className="my-lg"
/>
<ThematicsBlock
title={t('thematics')}
thematics={thematics}
className="my-lg"
/>
</>
);
}