2023-07-30 18:50:14 +02:00
|
|
|
'use client'
|
|
|
|
|
2022-03-24 18:57:27 +01:00
|
|
|
import { useMemo } from 'react'
|
2021-04-18 01:56:23 +02:00
|
|
|
|
2023-07-31 19:06:46 +02:00
|
|
|
import { useI18n } from '@/i18n/i18n.client'
|
2023-07-30 18:50:14 +02:00
|
|
|
import { BIRTH_DATE, BIRTH_DATE_STRING, getAge } from '@/utils/getAge'
|
2023-08-01 14:11:46 +02:00
|
|
|
import type { CookiesStore } from '@/utils/constants'
|
2022-03-24 11:45:19 +01:00
|
|
|
|
2021-04-18 01:56:23 +02:00
|
|
|
import { ProfileItem } from './ProfileItem'
|
|
|
|
|
2023-07-31 19:06:46 +02:00
|
|
|
export interface ProfileListProps {
|
|
|
|
cookiesStore: CookiesStore
|
|
|
|
}
|
|
|
|
|
|
|
|
export const ProfileList = (props: ProfileListProps): JSX.Element => {
|
|
|
|
const { cookiesStore } = props
|
|
|
|
|
|
|
|
const i18n = useI18n(cookiesStore)
|
2021-04-18 01:56:23 +02:00
|
|
|
|
2022-03-24 18:57:27 +01:00
|
|
|
const age = useMemo(() => {
|
2023-05-30 21:51:27 +02:00
|
|
|
return getAge(BIRTH_DATE)
|
2022-03-24 18:57:27 +01:00
|
|
|
}, [])
|
|
|
|
|
2021-04-18 01:56:23 +02:00
|
|
|
return (
|
2021-12-04 15:52:51 +01:00
|
|
|
<ul className='m-0 list-none p-0'>
|
2023-05-29 17:10:14 +02:00
|
|
|
<ProfileItem
|
2023-07-31 19:06:46 +02:00
|
|
|
title={i18n.translate('home.about.pronouns')}
|
|
|
|
value={i18n.translate('home.about.pronouns-value')}
|
|
|
|
/>
|
|
|
|
<ProfileItem
|
|
|
|
title={i18n.translate('home.about.birth-date')}
|
|
|
|
value={`${BIRTH_DATE_STRING} (${age} ${i18n.translate(
|
|
|
|
'home.about.years-old'
|
|
|
|
)})`}
|
2023-05-29 17:10:14 +02:00
|
|
|
/>
|
2022-03-24 11:45:19 +01:00
|
|
|
<ProfileItem
|
2023-07-31 19:06:46 +02:00
|
|
|
title={i18n.translate('home.about.nationality')}
|
|
|
|
value='Alsace, France'
|
2022-03-24 11:45:19 +01:00
|
|
|
/>
|
2021-05-08 19:52:04 +02:00
|
|
|
<ProfileItem
|
|
|
|
title='Email'
|
2023-05-30 21:51:27 +02:00
|
|
|
value='contact@theoludwig.fr'
|
|
|
|
link='mailto:contact@theoludwig.fr'
|
2021-05-08 19:52:04 +02:00
|
|
|
/>
|
|
|
|
</ul>
|
2021-04-18 01:56:23 +02:00
|
|
|
)
|
|
|
|
}
|