blob: 5143662268343d4e0fad6109d9f894e906a0f516 (
plain)
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
|
import { t } from 'i18next'
import React from 'react'
import { Link, useNavigate } from 'react-router-dom'
import Card from '../../../components/Card/Card'
import Header from '../../../components/Header/Header'
import SubmitButton from '../../../components/SubmitButton/SubmitButton'
import { userContext } from '../../../context/User'
import AudioAutoplay from '../../../components/AudioAutoplay/AudioAutoplay'
import styles from './UpdateSelect.module.css'
const UpdateSelect = () => {
const { userData, oriUserData } = userContext()
const navigate = useNavigate()
return (
<>
<Header subheading={t('UPDATE')} />
<AudioAutoplay
audio={`${process.env.PUBLIC_URL}/assets/audios/choose-demographic-or-biometric`}
/>
<div className={styles.card__container}>
<Link to="/update/demographic">
<Card
title={t('DEMOGRAPHIC')}
image={`${process.env.PUBLIC_URL}/assets/images/demographic.svg`}
/>
</Link>
<Link to="/update/biometric">
<Card
title={t('BIOMETRIC')}
image={`${process.env.PUBLIC_URL}/assets/images/biometrics.svg`}
/>
</Link>
<SubmitButton
onClick={() => {
if (userData === oriUserData) {
navigate('/no-update')
} else {
navigate('/update/agreement')
}
}}
/>
</div>
</>
)
}
export default UpdateSelect
|