diff --git a/app/components/ui/carousel.tsx b/app/components/ui/carousel.tsx deleted file mode 100644 index 6fe2f3b..0000000 --- a/app/components/ui/carousel.tsx +++ /dev/null @@ -1,171 +0,0 @@ -import { useState } from 'react' -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 { useNewsContext } from '~/contexts/news' -import type { TNews } from '~/types/news' - -import { Button } from './button' - -export const Carousel = (properties: TNews) => { - const { setIsSuccessOpen } = useNewsContext() - const [currentIndex, setCurrentIndex] = useState(0) - const { pathname } = useLocation() - const hasCategory = pathname.includes('/category/') - - const { title, description, items, type } = properties - const itemsPerPage = type === 'hero' ? 1 : 3 - const totalPages = Math.ceil(items.length / itemsPerPage) - - const nextSlide = () => { - setCurrentIndex((previousIndex) => (previousIndex + 1) % totalPages) - } - - const previousSlide = () => { - setCurrentIndex( - (previousIndex) => (previousIndex - 1 + totalPages) % totalPages, - ) - } - return ( -
-
-
-

- {title} -

-

- {description} -

-
- {!hasCategory && ( -
- - -
- )} -
- -
- {items - .slice(currentIndex * itemsPerPage, (currentIndex + 1) * itemsPerPage) - .map(({ featured, title, content, tags, slug, isPremium }, index) => ( -
- {title} -
-
- {tags?.map((item) => ( - - {item} - - ))} - {isPremium && ( - - Premium Content - - )} -
- -
-

- {title} -

-

- {content} -

-
- -
-
- ))} -
- - {hasCategory && ( -
-
- - -
-
- )} -
- ) -} diff --git a/app/components/ui/table.tsx b/app/components/ui/table.tsx deleted file mode 100644 index 12a9334..0000000 --- a/app/components/ui/table.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import DT from 'datatables.net-dt' -import DataTable from 'datatables.net-react' - -export const TableComponent = () => { - DataTable.use(DT) - return ( - <> -

test

- - - ) -}