import React from 'react'; import type { IconDefinition } from '@fortawesome/fontawesome-svg-core'; import { faFacebook, faGoogle } from '@fortawesome/free-brands-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Link } from '@inertiajs/react'; import styles from './Footer.module.css'; const BrandsIcons = { faFacebook, faGoogle, } interface FooterLink { type: 'link'; data: { name: string; icon?: keyof typeof BrandsIcons; link: string; external: boolean; }; } export default function Footer() { const [links, setLinks] = React.useState([]); React.useEffect(() => { fetch('/api/footer') .then(res => res.json()) .then(response => { if (response.status === 'success') { setLinks(response.data); } }) .catch(error => { console.error('Error fetching footer links:', error); }); }, []); return ( ); }