import { useRef, useEffect, useState } from "react"; import { useButtonClick } from "@/hooks/useButtonClick"; type FooterColumn = { title: string; items: { label: string; href?: string; onClick?: () => void }[]; }; type FooterLink = { label: string; href?: string; onClick?: () => void; }; const FooterLinkItem = ({ label, href, onClick }: FooterLink) => { const handleClick = useButtonClick(href, onClick); return ( {label} ); }; const FooterBottomLink = ({ label, href, onClick }: FooterLink) => { const handleClick = useButtonClick(href, onClick); return ( {label} ); }; const FooterSimpleReveal = ({ brand, columns, copyright, links, }: { brand: string; columns: FooterColumn[]; copyright: string; links: FooterLink[]; }) => { const footerRef = useRef(null); const [footerHeight, setFooterHeight] = useState(0); useEffect(() => { const updateHeight = () => { if (footerRef.current) { setFooterHeight(footerRef.current.offsetHeight); } }; updateHeight(); const resizeObserver = new ResizeObserver(updateHeight); if (footerRef.current) { resizeObserver.observe(footerRef.current); } return () => resizeObserver.disconnect(); }, []); return ( ); }; export default FooterSimpleReveal;