import React from 'react'; import TitleCard from '../TitleCard'; interface SliderProps { sliderKey: string; items?: JSX.Element[]; isLoading: boolean; isEmpty: boolean; } const Slider: React.FC = ({ sliderKey, items, isLoading, isEmpty, }) => { return (
{items?.map((item, index) => (
{item}
))} {isLoading && [...Array(10)].map((_item, i) => (
))} {isEmpty && (
No Results
)}
); }; export default Slider;