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 Divider from '@/core/components/elements/Divider/Divider' import ImageSkeleton from '@/core/components/elements/Skeleton/ImageSkeleton' import MobileView from '@/core/components/views/MobileView' import DesktopView from '@/core/components/views/DesktopView' const swiperBanner = { pagination: { dynamicBullets: true }, autoplay: { delay: 6000, disableOnInteraction: false }, modules: [Pagination, Autoplay] } const Brand = ({ id }) => { const { brand } = useBrand({ id }) return ( <> <> {brand.isLoading && } {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.isLoading && } {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} )} > )} > ) } export default Brand