mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-24 08:54:05 +10:00
2c22c13f3e
- upgrade gatsby v2 to v3 - update functions
33 lines
797 B
JavaScript
33 lines
797 B
JavaScript
import { useTranslation } from 'react-i18next';
|
|
import React, { memo, useContext } from 'react';
|
|
import { formatDate } from '../../../utils';
|
|
import PageContext from '../../../contexts/PageContext';
|
|
|
|
const BirthDateA = () => {
|
|
const { t } = useTranslation();
|
|
const { data } = useContext(PageContext);
|
|
|
|
if (data.profile.birthDate) {
|
|
return (
|
|
<div className="text-xs">
|
|
<h6 className="capitalize font-semibold">
|
|
{t('builder.profile.birthDate')}
|
|
</h6>
|
|
<div>
|
|
<span>
|
|
{formatDate({
|
|
date: data.profile.birthDate,
|
|
language: data.metadata.language,
|
|
includeDay: true,
|
|
})}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
return null;
|
|
};
|
|
|
|
export default memo(BirthDateA);
|