mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-20 19:51:27 +10:00
- fix label in contact
- fix importing from json - fix reset everything - update dependencies
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import { get } from 'lodash';
|
||||
import React, { memo, useContext } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { FaCaretRight } from 'react-icons/fa';
|
||||
import PageContext from '../../../contexts/PageContext';
|
||||
import { safetyCheck } from '../../../utils';
|
||||
@ -7,7 +8,7 @@ import Icons from '../Icons';
|
||||
|
||||
const ContactItem = ({ value, icon, link }) => {
|
||||
const { data } = useContext(PageContext);
|
||||
const Icon = get(Icons, icon.toLowerCase(), FaCaretRight);
|
||||
const Icon = get(Icons, icon && icon.toLowerCase(), FaCaretRight);
|
||||
|
||||
return value ? (
|
||||
<div className="flex items-center">
|
||||
@ -28,22 +29,23 @@ const ContactItem = ({ value, icon, link }) => {
|
||||
};
|
||||
|
||||
const ContactA = () => {
|
||||
const { t } = useTranslation();
|
||||
const { data } = useContext(PageContext);
|
||||
|
||||
return (
|
||||
<div className="text-xs grid gap-2">
|
||||
<ContactItem
|
||||
icon="phone"
|
||||
label={t('shared.forms.phone')}
|
||||
value={data.profile.phone}
|
||||
link={`tel:${data.profile.phone}`}
|
||||
/>
|
||||
<ContactItem
|
||||
icon="website"
|
||||
label={t('shared.forms.website')}
|
||||
value={data.profile.website}
|
||||
link={data.profile.website}
|
||||
/>
|
||||
<ContactItem
|
||||
icon="email"
|
||||
label={t('shared.forms.email')}
|
||||
value={data.profile.email}
|
||||
link={`mailto:${data.profile.email}`}
|
||||
/>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { get } from 'lodash';
|
||||
import React, { memo, useContext } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { FaCaretRight } from 'react-icons/fa';
|
||||
import PageContext from '../../../contexts/PageContext';
|
||||
import { safetyCheck } from '../../../utils';
|
||||
@ -28,22 +29,23 @@ const ContactItem = ({ value, icon, link }) => {
|
||||
};
|
||||
|
||||
const ContactA = () => {
|
||||
const { t } = useTranslation();
|
||||
const { data } = useContext(PageContext);
|
||||
|
||||
return (
|
||||
<div className="text-xs grid gap-2">
|
||||
<ContactItem
|
||||
icon="phone"
|
||||
label={t('shared.forms.phone')}
|
||||
value={data.profile.phone}
|
||||
link={`tel:${data.profile.phone}`}
|
||||
/>
|
||||
<ContactItem
|
||||
icon="website"
|
||||
label={t('shared.forms.website')}
|
||||
value={data.profile.website}
|
||||
link={data.profile.website}
|
||||
/>
|
||||
<ContactItem
|
||||
icon="email"
|
||||
label={t('shared.forms.email')}
|
||||
value={data.profile.email}
|
||||
link={`mailto:${data.profile.email}`}
|
||||
/>
|
||||
|
||||
@ -40,17 +40,17 @@ const ContactC = () => {
|
||||
)}
|
||||
|
||||
<ContactItem
|
||||
label="phone"
|
||||
label={t('shared.forms.phone')}
|
||||
value={data.profile.phone}
|
||||
link={`tel:${data.profile.phone}`}
|
||||
/>
|
||||
<ContactItem
|
||||
label="website"
|
||||
label={t('shared.forms.website')}
|
||||
value={data.profile.website}
|
||||
link={data.profile.website}
|
||||
/>
|
||||
<ContactItem
|
||||
label="email"
|
||||
label={t('shared.forms.email')}
|
||||
value={data.profile.email}
|
||||
link={`mailto:${data.profile.email}`}
|
||||
/>
|
||||
|
||||
@ -58,17 +58,17 @@ const ContactD = () => {
|
||||
)}
|
||||
|
||||
<ContactItem
|
||||
label="phone"
|
||||
label={t('shared.forms.phone')}
|
||||
value={data.profile.phone}
|
||||
link={`tel:${data.profile.phone}`}
|
||||
/>
|
||||
<ContactItem
|
||||
label="website"
|
||||
label={t('shared.forms.website')}
|
||||
value={data.profile.website}
|
||||
link={data.profile.website}
|
||||
/>
|
||||
<ContactItem
|
||||
label="email"
|
||||
label={t('shared.forms.email')}
|
||||
value={data.profile.email}
|
||||
link={`mailto:${data.profile.email}`}
|
||||
/>
|
||||
|
||||
@ -40,17 +40,17 @@ const ContactE = () => {
|
||||
</div>
|
||||
|
||||
<ContactItem
|
||||
label="phone"
|
||||
label={t('shared.forms.phone')}
|
||||
value={data.profile.phone}
|
||||
link={`tel:${data.profile.phone}`}
|
||||
/>
|
||||
<ContactItem
|
||||
label="website"
|
||||
label={t('shared.forms.website')}
|
||||
value={data.profile.website}
|
||||
link={data.profile.website}
|
||||
/>
|
||||
<ContactItem
|
||||
label="email"
|
||||
label={t('shared.forms.email')}
|
||||
value={data.profile.email}
|
||||
link={`mailto:${data.profile.email}`}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user