import Link from "next/link"; import { ModeToggle } from "@/components/theme-toggle"; import docuData from "@/docu.json"; import * as LucideIcons from "lucide-react"; // Define types for docu.json interface SocialItem { name: string; url: string; iconName: string; } interface FooterConfig { copyright: string; social?: SocialItem[]; } // Type assertion for docu.json const docuConfig = docuData as { footer: FooterConfig; }; export function Footer() { const { footer } = docuConfig; return ( ); } export function FooterButtons() { const footer = docuConfig?.footer; // Jangan render apapun jika tidak ada data sosial if (!footer || !Array.isArray(footer.social) || footer.social.length === 0) { return null; } return ( <> {footer.social.map((item) => { const IconComponent = (LucideIcons[item.iconName as keyof typeof LucideIcons] ?? LucideIcons["Globe"]) as React.FC<{ className?: string }>; return ( ); })} ); } export function MadeWith() { return ( <> Made with DocuBook ); }