"use client"; import { Instagram } from "lucide-react"; import Image from "next/image"; import { useState, useEffect } from "react"; import { getPublicClients, PublicClient, } from "@/service/client/public-clients"; import { Swiper, SwiperSlide } from "swiper/react"; import { Navigation, Autoplay } from "swiper/modules"; import "swiper/css"; import "swiper/css/navigation"; import LocalSwitcher from "../partials/header/locale-switcher"; import { useTranslations } from "next-intl"; // Custom styles for Swiper const swiperStyles = ` .client-swiper .swiper-button-next, .client-swiper .swiper-button-prev { background: white; border-radius: 50%; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); width: 32px; height: 32px; margin-top: 0; } .client-swiper .swiper-button-next:after, .client-swiper .swiper-button-prev:after { font-size: 14px; font-weight: bold; } .client-swiper .swiper-button-disabled { opacity: 0.3; } .client-swiper.swiper-centered .swiper-button-next, .client-swiper.swiper-centered .swiper-button-prev { display: none; } .client-swiper.swiper-centered .swiper-wrapper { justify-content: center; } @media (max-width: 768px) { .client-swiper .swiper-button-next, .client-swiper .swiper-button-prev { display: none; } } `; // const logos = [ // { src: "/mabes.png", href: "/in/public/publication/kl" }, // { src: "/saw.png", href: "/" }, // { src: "/mpr.png", href: "/" }, // { src: "/dpr.png", href: "/" }, // { src: "/ma.png", href: "/" }, // { src: "/badan.png", href: "/" }, // { src: "/kpk.png", href: "/" }, // { src: "/pln.png", href: "/" }, // ]; const logos = [ { src: "/mabes.png", slug: "mabes" }, { src: "/saw.png", slug: "kejaksaan-agung" }, { src: "/mpr.png", slug: "mpr-ri" }, { src: "/dpr.png", slug: "dpr-ri" }, { src: "/ma.png", slug: "mahkamah-agung" }, { src: "/badan.png", slug: "kemenkeu" }, { src: "/kpk.png", slug: "kpk" }, { src: "/pln.png", slug: "pupr" }, ]; export default function Footer() { const t = useTranslations("MediaUpdate"); const [clients, setClients] = useState([]); const [loading, setLoading] = useState(true); // Fetch public clients useEffect(() => { async function fetchClients() { try { const response = await getPublicClients(); if (response?.data?.success && response.data.data) { setClients(response.data.data); } } catch (error) { console.error("Error fetching public clients:", error); setClients([]); } finally { setLoading(false); } } fetchClients(); }, []); return ( ); }