+
{layout[0] &&
diff --git a/src/templates/blocks/BirthDate/BirthDateA.js b/src/templates/blocks/BirthDate/BirthDateA.js
new file mode 100644
index 00000000..486919a9
--- /dev/null
+++ b/src/templates/blocks/BirthDate/BirthDateA.js
@@ -0,0 +1,26 @@
+import React, { memo, useContext } from 'react';
+import { useTranslation } from 'react-i18next';
+import PageContext from '../../../contexts/PageContext';
+import { formatDate } from '../../../utils';
+
+const BirthDateA = () => {
+ const { t } = useTranslation();
+ const { data } = useContext(PageContext);
+
+ if (data.profile.birthDate) {
+ return (
+
+
+ {t('builder.profile.birthDate')}
+
+
+ {formatDate({ date: data.profile.birthDate, language: data.metadata.language, includeDay: true })}
+
+
+ );
+ }
+
+ return null;
+}
+
+export default memo(BirthDateA);
\ No newline at end of file
diff --git a/src/templates/blocks/BirthDate/BirthDateB.js b/src/templates/blocks/BirthDate/BirthDateB.js
new file mode 100644
index 00000000..67a14059
--- /dev/null
+++ b/src/templates/blocks/BirthDate/BirthDateB.js
@@ -0,0 +1,27 @@
+import React, { memo, useContext } from 'react';
+import PageContext from '../../../contexts/PageContext';
+import { get } from 'lodash';
+import Icons from '../Icons';
+import { formatDate } from '../../../utils';
+
+const BirthDateB = () => {
+ const { data } = useContext(PageContext);
+ const Icon = get(Icons, "birthdaycake");
+
+ if (data.profile.birthDate) {
+ return (
+
+
+ {formatDate({ date: data.profile.birthDate, language: data.metadata.language, includeDay: true })}
+
+ );
+ }
+
+ return null;
+}
+
+export default memo(BirthDateB);
\ No newline at end of file
diff --git a/src/templates/blocks/BirthDate/BirthDateC.js b/src/templates/blocks/BirthDate/BirthDateC.js
new file mode 100644
index 00000000..8c8c04e9
--- /dev/null
+++ b/src/templates/blocks/BirthDate/BirthDateC.js
@@ -0,0 +1,27 @@
+import React, { memo, useContext } from 'react';
+import PageContext from '../../../contexts/PageContext';
+import { get } from 'lodash';
+import Icons from '../Icons';
+import { formatDate } from '../../../utils';
+
+const BirthDateC = () => {
+ const { data } = useContext(PageContext);
+ const Icon = get(Icons, "birthdaycake");
+
+ if (data.profile.birthDate) {
+ return (
+
+
+ {formatDate({ date: data.profile.birthDate, language: data.metadata.language, includeDay: true })}
+
+ );
+ }
+
+ return null;
+}
+
+export default memo(BirthDateC);
\ No newline at end of file
diff --git a/src/templates/blocks/Contact/ContactE.js b/src/templates/blocks/Contact/ContactE.js
deleted file mode 100644
index 28413fea..00000000
--- a/src/templates/blocks/Contact/ContactE.js
+++ /dev/null
@@ -1,72 +0,0 @@
-import React, { memo, useContext } from 'react';
-import { useTranslation } from 'react-i18next';
-import PageContext from '../../../contexts/PageContext';
-import { safetyCheck } from '../../../utils';
-
-const ContactItem = ({ value, label, link }) => {
- return value ? (
-
-
{label}
- {link ? (
-
- {value}
-
- ) : (
-
{value}
- )}
-
- ) : null;
-};
-
-const ContactE = () => {
- const { t } = useTranslation();
- const { data, heading: Heading } = useContext(PageContext);
-
- return (
-
-
{t('builder.sections.profile')}
-
-
-
- {t('shared.forms.address')}
-
-
- {data.profile.address.line1}
- {data.profile.address.line2}
-
- {data.profile.address.city} {data.profile.address.pincode}
-
-
-
-
-
-
-
-
- {safetyCheck(data.social) &&
- data.social.items.map((x) => (
-
- ))}
-
-
- );
-};
-
-export default memo(ContactE);
diff --git a/src/templates/blocks/Icons.js b/src/templates/blocks/Icons.js
index 7e24dcf0..afc93f5f 100644
--- a/src/templates/blocks/Icons.js
+++ b/src/templates/blocks/Icons.js
@@ -8,7 +8,8 @@ import {
FaInstagram,
FaStackOverflow,
FaBehance,
- FaGitlab
+ FaGitlab,
+ FaBirthdayCake
} from 'react-icons/fa';
import { MdPhone, MdEmail } from 'react-icons/md';
@@ -24,7 +25,8 @@ const Icons = {
instagram: FaInstagram,
stackoverflow: FaStackOverflow,
behance: FaBehance,
- gitlab: FaGitlab
+ gitlab: FaGitlab,
+ birthdaycake: FaBirthdayCake
};
export default Icons;
diff --git a/src/utils/index.js b/src/utils/index.js
index 87e0daa9..273c53d3 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -20,8 +20,11 @@ export const isFileImage = (file) => {
return file && acceptedImageTypes.includes(file.type);
};
-export const formatDate = ({ date, language = 'en' }) => {
- return dayjs(date).locale(language.substr(0, 2)).format('MMMM YYYY');
+export const formatDate = ({ date, language = 'en', includeDay = false }) => {
+ const monthYearTemplate = 'MMMM YYYY';
+ const template = includeDay ? 'DD ' + monthYearTemplate : monthYearTemplate;
+
+ return dayjs(date).locale(language.substr(0, 2)).format(template);
};
export const formatDateRange = ({ startDate, endDate, language = 'en' }, t) => {