"use client"; import React, { useState, useEffect } from 'react'; import InfoItem from "@/components/info-item"; import HumanCard from "@/components/human-card"; interface InfoItemProps { name: string; img?: string; } interface HumanCardProps { name: string; post: string; skills: string[]; } interface ClientComponentProps { infoItems: InfoItemProps[]; humanCards: HumanCardProps[]; } const ClientComponent: React.FC = ({ infoItems, humanCards }) => { const [isLg, setIsLg] = useState(false); useEffect(() => { const handleResize = () => { setIsLg(window.innerWidth >= 1024); }; // Устанавливаем значение при первом рендере handleResize(); window.addEventListener('resize', handleResize); return () => window.removeEventListener('resize', handleResize); }, []); return ( <>
{infoItems.map((item, index) => ( ))}
{humanCards.map((card, index) => ( ))}
); }; export default ClientComponent;