import { Link, useLocation } from 'react-router' import { twMerge } from 'tailwind-merge' import { CarouselNextIcon } from '~/components/icons/carousel-next' import { CarouselPreviousIcon } from '~/components/icons/carousel-previous' import type { TNews } from '~/types/news' import { Button } from './button' export const Carousel = (properties: TNews) => { const location = useLocation() const hasCategory = location.pathname.includes('/category/') const { title, description, items, type } = properties return (

{title}

{description}

{!hasCategory && (
)}
{items.map(({ featured, title, content, tags, slug }, index) => (
{title}
{tags?.map((item, index) => ( {item} ))}

{title}

{content}

))}
{hasCategory && (
)}
) }