import React from 'react'; import { SanitizedEducation } from '../../interfaces/sanitized-config'; import { skeleton } from '../../utils'; const ListItem = ({ time, degree, institution, }: { time: React.ReactNode; degree?: React.ReactNode; institution?: React.ReactNode; }) => (
  • {time}

    {degree}

    {institution}
  • ); const EducationCard = ({ loading, educations, }: { loading: boolean; educations: SanitizedEducation[]; }) => { const renderSkeleton = () => { const array = []; for (let index = 0; index < 2; index++) { array.push( , ); } return array; }; return (
    {loading ? ( skeleton({ widthCls: 'w-32', heightCls: 'h-8' }) ) : ( Education )}
      {loading ? ( renderSkeleton() ) : ( <> {educations.map((item, index) => ( ))} )}
    ); }; export default EducationCard;