import Link from "next/link"; import { ModeToggle } from "@/components/ThemeToggle"; import docuData from "@/docu.json"; import { getSocialIconByName } from "@/lib/icon"; // Define types for docu.json interface SocialItem { name: string; url: string; } interface FooterConfig { copyright: string; social?: SocialItem[]; } // Type assertion for docu.json const docuConfig = docuData as { footer: FooterConfig; }; interface FooterProps { id?: string; } export function Footer({ id }: FooterProps) { const { footer } = docuConfig; return ( ); } export function FooterButtons() { const footer = docuConfig?.footer; // Don't render anything if there is no social data if (!footer || !Array.isArray(footer.social) || footer.social.length === 0) { return null; } return ( <> {footer.social.map((item) => { const IconComponent = getSocialIconByName(item.name); return ( ); })} ); } export function MadeWith() { return ( <> Made with DocuBook ); }