import { skeleton } from '../../helpers/utils';
import config from '../../ezprofile.config';
import { Fragment } from 'react';
import PropTypes from 'prop-types';
const ListItem = ({ time, position, company }) => (
{time}
{position}
{company}
);
const Experience = ({ loading }) => {
const renderSkeleton = () => {
let array = [];
for (let index = 0; index < 2; index++) {
array.push(
);
}
return array;
};
return (
<>
{typeof config.experiences !== 'undefined' &&
config.experiences.length !== 0 && (
{loading ? (
skeleton({ width: 'w-32', height: 'h-8' })
) : (
Experience
)}
{loading ? (
renderSkeleton()
) : (
{config.experiences.map((experience, index) => (
))}
)}
)}
>
);
};
ListItem.propTypes = {
time: PropTypes.node,
position: PropTypes.node,
company: PropTypes.node,
};
Experience.propTypes = {
loading: PropTypes.bool,
};
export default Experience;