import useBrand from '../hooks/useBrand' import Image from 'next/image' import { Swiper, SwiperSlide } from 'swiper/react' import { Pagination, Autoplay } from 'swiper' import 'swiper/css' import 'swiper/css/pagination' import 'swiper/css/autoplay' import MobileView from '@/core/components/views/MobileView' import DesktopView from '@/core/components/views/DesktopView' import { Skeleton } from '@chakra-ui/react' import classNames from 'classnames' const swiperBanner = { pagination: { dynamicBullets: true }, autoplay: { delay: 6000, disableOnInteraction: false }, modules: [Pagination, Autoplay] } const Brand = ({ brand }) => { // const { brand } = useBrand({ id }) return ( <> <> {brand.data?.banners?.length == 0 && ( )} {brand.data && ( <> {brand.data?.banners?.map((banner, index) => ( ))} Produk dari brand: {brand?.data?.logo && ( )} {!brand?.data?.logo && ( {brand?.data?.name} )} > )} > {brand.data?.banners?.length == 0 && ( )} {brand.data && ( <> {brand.data?.banners?.map((banner, index) => ( ))} > )} > ) } export default Brand