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:
@ -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'
|
||||
|
Reference in New Issue
Block a user