// Modules import { v4 as uuidv4 } from "uuid"; // Components import News from "../news/News"; import Pagination from "./Pagination"; // Types import { INewPostsData } from "../../types/posts.types"; import Loader from "./Loader"; interface IProps { data: INewPostsData; word?: string; pagination: boolean; pageMemo: { activePage: number; setActivePage: any; }; avoidFirst?: boolean; } const CustomNewsScroll = ({ data, word, pagination = false, pageMemo, avoidFirst, }: IProps) => { console.log(data); return (
{data ? ( data.data.map((dataEl, index) => { if (avoidFirst) { if (index > 0) { return ( ); } } else { return ( ); } }) ) : (

Нет новостей для "{word || ""}"

)}
{pagination ? ( data ? ( ) : null ) : null}
); }; export default CustomNewsScroll;