import useBrand from "../hooks/useBrand" import Image from "@/core/components/elements/Image/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" 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 && ( <> { brand.data?.banners?.map((banner, index) => ( {`Brand )) }
Produk dari brand:
{ brand?.data?.logo && ( {brand?.data?.name} ) } { !brand?.data?.logo && (
{ brand?.data?.name }
) }
) }
) } export default Brand