import { Cake, Email, Phone, Public, Room } from '@mui/icons-material'; import get from 'lodash/get'; import isEmpty from 'lodash/isEmpty'; import Markdown from '@/components/shared/Markdown'; import { useAppSelector } from '@/store/hooks'; import DataDisplay from '@/templates/shared/DataDisplay'; import { formatDateString } from '@/utils/date'; import getProfileIcon from '@/utils/getProfileIcon'; import { addHttp, formatLocation, getPhotoClassNames } from '@/utils/template'; export const MastheadSidebar: React.FC = () => { const dateFormat: string = useAppSelector((state) => get(state.resume, 'metadata.date.format')); const primaryColor: string = useAppSelector((state) => get(state.resume, 'metadata.theme.primary')); const { name, headline, photo, email, phone, birthdate, website, location, profiles } = useAppSelector( (state) => state.resume.basics ); return (
{photo.visible && !isEmpty(photo.url) && ( {name} )}

{name}

{headline}

} className="text-xs"> {formatLocation(location)} } className="text-xs"> {formatDateString(birthdate, dateFormat)} } className="text-xs" link={`mailto:${email}`}> {email} } className="text-xs" link={`tel:${phone}`}> {phone} } link={addHttp(website)} className="text-xs"> {website} {profiles.map(({ id, username, network, url }) => ( {username} ))}
); }; export const MastheadMain: React.FC = () => { const { summary } = useAppSelector((state) => state.resume.basics); return {summary}; };