onHover(true)}
onMouseLeave={() => onHover(false)}
>
{typeof brand.logo === 'string' ? (
) : typeof brand.logo === 'function' ? (
React.createElement(brand.logo, { className: 'text-3xl text-white' })
) : (
React.cloneElement(brand.logo, { className: 'text-3xl text-white' })
)}
{brand.name}
)
);
BrandCard.displayName = 'BrandCard';
const useMediaQuery = (query: string) => {
const [matches, setMatches] = useState(false);
useEffect(() => {
if (typeof window !== 'undefined') {
const media = window.matchMedia(query);
setMatches(media.matches);
const listener = () => setMatches(media.matches);
media.addEventListener('change', listener);
return () => media.removeEventListener('change', listener);
}
}, [query]);
return matches;
};
const BrandSection: React.FC