import Link from '@/core/components/elements/Link/Link' import Image from 'next/image' const { useQuery } = require('react-query') const { default: bannerSectionApi } = require('../api/bannerSectionApi') const BannerSection = () => { const fetchBannerSection = async () => await bannerSectionApi() const bannerSection = useQuery('bannerSection', fetchBannerSection) return ( bannerSection.data && bannerSection.data?.length > 0 && (
{bannerSection.data?.map((banner) => ( {banner.name} ))}
) ) } export default BannerSection