import AppLogo from '@/components/app-logo'; import { Button } from '@/components/ui/button'; import { SharedData } from '@/types/global'; import { Link, usePage } from '@inertiajs/react'; import { DynamicIcon } from 'lucide-react/dynamic'; const Footer = () => { const { footer, system } = usePage().props; const sortedItems = footer.footer_items.sort((a, b) => a.sort - b.sort); const listItems = sortedItems.filter((item) => item.type === 'list' && item.active); const copyrightItem = sortedItems.find((item) => item.type === 'copyright' && item.active); const socialMediaItem = sortedItems.find((item) => item.type === 'social_media' && item.active); return (

{system.fields.description}

{socialMediaItem && (
{socialMediaItem.items && Array.isArray(socialMediaItem.items) && socialMediaItem.items.map((socialItem: any, idx: number) => ( ))}
)}
{listItems.map((section) => (

{section.title}

    {section.items?.map((item, itemIndex) => section.slug === 'address' ? (
  • {item.title}
  • ) : (
  • {item.title}
  • ), )}
))}
{/* Copyright Section */} {copyrightItem && (

{copyrightItem.title}

)}
); }; export default Footer;