import React, { useContext } from 'react'; import ReactMarkdown from 'react-markdown'; import AppContext from '../../context/AppContext'; import { hexToRgb } from '../../utils'; const Glalie = () => { const context = useContext(AppContext); const { state } = context; const { data, theme } = state; const { r, g, b } = hexToRgb(theme.colors.accent) || {}; const Photo = () => data.profile.photo !== '' && ( Resume Photograph ); const FullName = () => (

{data.profile.firstName}

{data.profile.lastName}

); const Subtitle = () => (
{data.profile.subtitle}
); const Divider = () => (
); const ContactItem = ({ title, value }) => value && (
{title}

{value}

); const ContactInformation = () => (

flare

home

{data.profile.address.line1}

{data.profile.address.line2}

{data.profile.address.line3}

); const Heading = ({ title }) => (
{title}
); const Objective = () => data.objective.enable && (

{data.objective.body}

); const WorkItem = x => (
{x.title}

{x.role} / {x.start} - {x.end}

); const Work = () => data.work && data.work.enable && (
{data.work.items.filter(x => x.enable).map(WorkItem)}
); const EducationItem = x => (
{x.name}

{x.major}

{x.start} - {x.end}

); const Education = () => data.education && data.education.enable && (
{data.education.items.filter(x => x.enable).map(EducationItem)}
); const AwardItem = x => (
{x.title}

{x.subtitle}

); const Awards = () => data.awards && data.awards.enable && (
{data.awards.items.filter(x => x.enable).map(AwardItem)}
); const CertificationItem = x => (
{x.title}

{x.subtitle}

); const Certifications = () => data.certifications && data.certifications.enable && (
{data.certifications.items.filter(x => x.enable).map(CertificationItem)}
); const SkillItem = x => (
  • {x}
  • ); const Skills = () => data.skills && data.skills.enable && (
      {data.skills.items.map(SkillItem)}
    ); const LanguageItem = x => (
    {x.key}
    {Array.from(Array(x.value)).map((_, i) => ( star ))}
    ); const Languages = () => data.languages && data.languages.enable && (
    {data.languages.items.filter(x => x.enable).map(LanguageItem)}
    ); const ReferenceItem = x => (
    {x.name}
    {x.position} {x.phone} {x.email}
    ); const References = () => data.references && data.references.enable && (
    {data.references.items.filter(x => x.enable).map(ReferenceItem)}
    ); const ExtraItem = x => ( {x.key} {x.value} ); const Extras = () => data.extras && data.extras.enable && (
    {data.extras.items.filter(x => x.enable).map(ExtraItem)}
    ); return (
    ); }; export default Glalie;