"use client"; import { Swiper, SwiperSlide } from "swiper/react"; import Pagination from "../common/Pagination"; import { Autoplay, Navigation } from "swiper/modules"; import Link from "next/link"; import Image from "next/image"; import ModalVideo from "react-modal-video"; import { useState } from "react"; import { links, listItems, newsItems4, recentItems } from "@/data/blogs"; export default function Blogs2() { const [isOpen, setOpen] = useState(false); const swiperOptions = { // Corrected variable name from "newsPostPlider" spaceBetween: 30, speed: 2000, loop: true, autoplay: { delay: 2000, disableOnInteraction: false, }, modules: [Autoplay, Navigation], navigation: { nextEl: ".array-prev", prevEl: ".array-next", }, }; return ( <>
{newsItems4.map((item, index) => (
{item.type === "standard" && (
img
)} {item.type === "slider" && ( <>
{item.swiperSlides?.map((image, slideIndex) => (
{`Slide
))}
)} {item.type === "video" && ( )}
  • By Admin
  • {item.date}
  • {item.category}

{item.title}

{item.content}

read more
))}

Search

e.preventDefault()}>

Categories

    {listItems.map((item, index) => (
  • {item.text}{" "} {item.count}
  • ))}

Recent Post

{recentItems.map((item, index) => (
img
  • {item.date}
))}

Popular Tag

{links.map((link, index) => ( {link.text} ))}
{" "} setOpen(false)} />{" "} ); }