1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2025-05-29 22:37:44 +02:00

feat: display age nearby the birth date

This commit is contained in:
Divlo
2022-03-24 11:45:19 +01:00
parent 1152039663
commit a67d6665ea
13 changed files with 3273 additions and 4867 deletions

View File

@ -1,14 +1,30 @@
import useTranslation from 'next-translate/useTranslation'
import {
DIVLO_BIRTHDAY_DAY,
DIVLO_BIRTHDAY_MONTH,
DIVLO_BIRTHDAY_YEAR
} from 'utils/getAge'
import { ProfileItem } from './ProfileItem'
export const ProfileList: React.FC = () => {
export interface ProfileListProps {
age: number
}
export const ProfileList: React.FC<ProfileListProps> = (props) => {
const { age } = props
const { t } = useTranslation('home')
return (
<ul className='m-0 list-none p-0'>
<ProfileItem title={t('home:about.full-name')} value='Théo LUDWIG' />
<ProfileItem title={t('home:about.birth-date')} value='31/03/2003' />
<ProfileItem
title={t('home:about.birth-date')}
value={`${DIVLO_BIRTHDAY_DAY}/${DIVLO_BIRTHDAY_MONTH}/${DIVLO_BIRTHDAY_YEAR} (${age} ${t(
'home:about.years-old'
)})`}
/>
<ProfileItem title={t('home:about.nationality')} value='Alsace, France' />
<ProfileItem
title='Email'