Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 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 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | 1x 3x 3x 2x 1x | import { MouseEventHandler, useCallback } from 'react'
import { setCookie } from 'cookies-next'
import { GetServerSideProps } from 'next'
import { Trans, useTranslation } from 'next-i18next'
import { NextSeo } from 'next-seo'
import Router from 'next/router'
import ActionButton from '../components/ActionButton'
import AlertBlock from '../components/AlertBlock'
import Collapse from '../components/Collapse'
import ExternalLink from '../components/ExternalLink'
import Layout from '../components/Layout'
import { pageWithServerSideTranslations } from '../lib/utils/next-i18next-utils'
import { getDCTermsTitle } from '../lib/utils/seo-utils'
const Expectations = () => {
const { t } = useTranslation(['expectations', 'common'])
const handleOnAgreeClick: MouseEventHandler<HTMLButtonElement> = useCallback(
(e) => {
e.preventDefault()
setCookie('agreed-to-email-esrf-terms', 'true', { sameSite: true })
Router.push('/landing')
},
[],
)
return (
<>
<NextSeo
title={t('header')}
description={t('meta.description')}
additionalMetaTags={[getDCTermsTitle(t('header'))]}
/>
<Layout>
<AlertBlock page="expectations" />
<h1 id="main-header" className="h1" tabIndex={-1}>
{t('header')}
</h1>
<div className="max-w-prose">
<p>
<Trans i18nKey="thank-you" ns="expectations" />
</p>
<h2 className="h2 mb-4">{t('do-not-travel')}</h2>
<p>{t('not-liable')}</p>
<h2 className="h2">{t('header-privacy')}</h2>
<p>{t('privacy-description')}</p>
<Collapse title={t('header-privacy')}>
<p>
<Trans i18nKey={'description-privacy.1'} ns="expectations" />
</p>
<p>{t('description-privacy.2')}</p>
<p>{t('description-privacy.3')}</p>
<p>
<Trans
i18nKey={'description-privacy.4'}
ns="expectations"
components={{
Link: <ExternalLink href={t('description-privacy.4-link')} />,
}}
/>
</p>
<p>
<Trans
i18nKey={'description-privacy.5'}
ns="expectations"
components={{
Link: <ExternalLink href={t('description-privacy.5-link')} />,
}}
/>
</p>
<p>
<Trans
i18nKey={'description-privacy.6'}
ns="expectations"
components={{
Link: <ExternalLink href={t('description-privacy.6-link')} />,
}}
/>
</p>
</Collapse>
<div className="mt-8">
<ActionButton
id="btn-agree"
style="primary"
text={t('button-agree')}
onClick={handleOnAgreeClick}
/>
</div>
</div>
</Layout>
</>
)
}
export const getServerSideProps: GetServerSideProps = async ({ locale }) => ({
props: {
...(await pageWithServerSideTranslations(
locale ?? 'default',
'expectations',
)),
},
})
export default Expectations
|