import { skeleton } from '../../helpers/utils'; import { Fragment } from 'react'; import PropTypes from 'prop-types'; const ListItem = ({ time, degree, institution }) => (
  • {time}

    {degree}

    {institution}
  • ); const Education = ({ loading, education }) => { const renderSkeleton = () => { let array = []; for (let index = 0; index < 2; index++) { array.push( ); } return array; }; return ( <> {education?.length !== 0 && (
    {loading ? ( skeleton({ width: 'w-32', height: 'h-8' }) ) : ( Education )}
      {loading ? ( renderSkeleton() ) : ( {education.map((item, index) => ( ))} )}
    )} ); }; Education.propTypes = { loading: PropTypes.bool.isRequired, education: PropTypes.array.isRequired, }; ListItem.propTypes = { time: PropTypes.node, degree: PropTypes.node, institution: PropTypes.node, }; export default Education;