-
Notifications
You must be signed in to change notification settings - Fork 76
/
Copy pathContactPage.tsx
79 lines (76 loc) · 2.46 KB
/
ContactPage.tsx
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
import React from 'react';
import classes from './ContactPage.module.css';
import { Trans, useTranslation } from 'react-i18next';
import { EnvelopeClosedIcon, SlackIcon, GitHubIcon } from '@studio/icons';
import { GetInTouchWith } from 'app-shared/getInTouch';
import {
EmailContactProvider,
GitHubIssueContactProvider,
SlackContactProvider,
} from 'app-shared/getInTouch/providers';
import {
StudioPageImageBackgroundContainer,
StudioHeading,
StudioParagraph,
} from '@studio/components';
import { ContactSection, type ContactSectionProps } from '../../components/ContactSection';
export const ContactPage = (): React.ReactElement => {
const { t } = useTranslation();
const contactByEmail = new GetInTouchWith(new EmailContactProvider());
const contactBySlack = new GetInTouchWith(new SlackContactProvider());
const contactByGitHubIssue = new GetInTouchWith(new GitHubIssueContactProvider());
const contactSections: Array<ContactSectionProps> = [
{
title: t('contact.email.heading'),
description: t('contact.email.content'),
link: {
name: t('general.service_desk.email'),
href: contactByEmail.url('serviceDesk'),
},
Icon: EnvelopeClosedIcon,
},
{
title: t('contact.slack.heading'),
description: t('contact.slack.content'),
additionalContent: (
<StudioParagraph spacing asChild>
<ul>
<Trans i18nKey='contact.slack.content_list'>
<li />
</Trans>
</ul>
</StudioParagraph>
),
link: {
name: t('contact.slack.link'),
href: contactBySlack.url('product-altinn-studio'),
},
Icon: SlackIcon,
},
{
title: t('contact.github_issue.heading'),
description: t('contact.github_issue.content'),
link: {
name: t('contact.github_issue.link_label'),
href: contactByGitHubIssue.url('choose'),
},
Icon: GitHubIcon,
},
];
return (
<StudioPageImageBackgroundContainer image='/designer/img/page-background.svg'>
<div className={classes.container}>
<div className={classes.content}>
<div>
<StudioHeading size='medium' spacing>
{t('general.contact')}
</StudioHeading>
</div>
{contactSections.map((contactSection) => (
<ContactSection {...contactSection} key={contactSection.title} />
))}
</div>
</div>
</StudioPageImageBackgroundContainer>
);
};