import { skeleton } from '../../helpers/utils'; import { Fragment } from 'react'; import PropTypes from 'prop-types'; const ListItem = ({ year, name, body, certLink }) => (
  • {year}
    {name}

    {body}

  • ); const Certifications = ({ certifications, loading }) => { const renderSkeleton = () => { let array = []; for (let index = 0; index < 2; index++) { array.push( ); } return array; }; return ( <> {certifications?.length !== 0 && (
    {loading ? ( skeleton({ width: 'w-32', height: 'h-8' }) ) : ( Certifications )}
      {loading ? ( renderSkeleton() ) : ( {certifications.map((certification, index) => ( ))} )}
    )} ); }; ListItem.propTypes = { year: PropTypes.node, name: PropTypes.node, body: PropTypes.node, certLink: PropTypes.string, }; Certifications.propTypes = { certifications: PropTypes.array.isRequired, loading: PropTypes.bool.isRequired, }; export default Certifications;