import React, { Fragment } from 'react';
import { SanitizedExperience } from '../../interfaces/sanitized-config';
import { skeleton } from '../../utils';
const ListItem = ({
time,
position,
company,
companyLink,
}: {
time: React.ReactNode;
position?: React.ReactNode;
company?: React.ReactNode;
companyLink?: string;
}) => (
{time}
{position}
);
const ExperienceCard = ({
experiences,
loading,
}: {
experiences: SanitizedExperience[];
loading: boolean;
}) => {
const renderSkeleton = () => {
const array = [];
for (let index = 0; index < 2; index++) {
array.push(
,
);
}
return array;
};
return (
{loading ? (
skeleton({ widthCls: 'w-32', heightCls: 'h-8' })
) : (
Experience
)}
{loading ? (
renderSkeleton()
) : (
{experiences.map((experience, index) => (
))}
)}
);
};
export default ExperienceCard;