import { Cake, Email, Phone, Public, Room } from '@mui/icons-material'; import { alpha } from '@mui/material'; import { Theme } from '@reactive-resume/schema'; import get from 'lodash/get'; import isEmpty from 'lodash/isEmpty'; 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'; const Masthead: React.FC = () => { const dateFormat: string = useAppSelector((state) => get(state.resume, 'metadata.date.format')); const { name, photo, headline, summary, email, phone, birthdate, website, location, profiles } = useAppSelector( (state) => state.resume.basics ); const theme: Theme = useAppSelector((state) => get(state.resume, 'metadata.theme', {})); return (

{name}

{headline}

{summary}

{photo.visible && !isEmpty(photo.url) && ( {name} )}
} className="col-span-2"> {formatLocation(location)} }>{formatDateString(birthdate, dateFormat)} } link={`mailto:${email}`}> {email} } link={`tel:${phone}`}> {phone} } link={addHttp(website)}> {website} {profiles.map(({ id, username, network, url }) => ( {username} ))}
); }; export default Masthead;