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'
|
||||
|
@ -3,13 +3,19 @@ import { ProfileInformation } from './ProfileInfo'
|
||||
import { ProfileList } from './ProfileList'
|
||||
import { ProfileLogo } from './ProfileLogo'
|
||||
|
||||
export const Profile: React.FC = () => {
|
||||
export interface ProfileProps {
|
||||
age: number
|
||||
}
|
||||
|
||||
export const Profile: React.FC<ProfileProps> = (props) => {
|
||||
const { age } = props
|
||||
|
||||
return (
|
||||
<div className='flex flex-col items-center justify-center px-10 pt-2 md:flex-row md:pt-10'>
|
||||
<ProfileLogo />
|
||||
<div>
|
||||
<ProfileInformation />
|
||||
<ProfileList />
|
||||
<ProfileList age={age} />
|
||||
<ProfileDescriptionBottom />
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user