mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-19 03:01:53 +10:00
Issue #314: Modified Castform template to handle data profile having no birthDate field (backward compatibility)
This commit is contained in:
@ -54,18 +54,22 @@ const Castform = ({ data, language }) => {
|
||||
</div>
|
||||
);
|
||||
|
||||
const BirthDate = () => (
|
||||
data.profile.birthDate && (
|
||||
<div className="text-xs">
|
||||
<h6 className="capitalize font-semibold">
|
||||
{t('builder.profile.birthDate')}
|
||||
</h6>
|
||||
<div>
|
||||
<span>{formatDate({ date: data.profile.birthDate, language, includeDay: true })}</span>
|
||||
const BirthDate = () => {
|
||||
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, includeDay: true })}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<PageContext.Provider value={{ data, heading: HeadingD }}>
|
||||
|
||||
Reference in New Issue
Block a user