diff --git a/components/Head.tsx b/components/Head.tsx index 795551a..5c617eb 100644 --- a/components/Head.tsx +++ b/components/Head.tsx @@ -3,7 +3,7 @@ import NextHead from 'next/head' interface HeadProps { title?: string image?: string - description: string + description?: string url?: string } @@ -11,7 +11,7 @@ export const Head: React.FC = (props) => { const { title = 'Divlo', image = 'https://divlo.fr/images/icons/icon-96x96.png', - description, + description = 'Divlo - Developer Full Stack Junior • Passionate about High-Tech', url = 'https://divlo.fr/' } = props diff --git a/components/Profile/ProfileList/index.tsx b/components/Profile/ProfileList/index.tsx index 82fa3f0..f450840 100644 --- a/components/Profile/ProfileList/index.tsx +++ b/components/Profile/ProfileList/index.tsx @@ -1,29 +1,23 @@ import useTranslation from 'next-translate/useTranslation' +import { useMemo } from 'react' -import { - DIVLO_BIRTHDAY_DAY, - DIVLO_BIRTHDAY_MONTH, - DIVLO_BIRTHDAY_YEAR -} from 'utils/getAge' +import { DIVLO_BIRTHDAY, DIVLO_BIRTHDAY_DATE, getAge } from 'utils/getAge' import { ProfileItem } from './ProfileItem' -export interface ProfileListProps { - age: number -} - -export const ProfileList: React.FC = (props) => { - const { age } = props +export const ProfileList: React.FC = () => { const { t } = useTranslation('home') + const age = useMemo(() => { + return getAge(DIVLO_BIRTHDAY) + }, []) + return (