diff --git a/app/components/ui/banner.tsx b/app/components/ui/banner.tsx
index 781730d..354f5e7 100644
--- a/app/components/ui/banner.tsx
+++ b/app/components/ui/banner.tsx
@@ -1,21 +1,38 @@
+import useEmblaCarousel from 'embla-carousel-react'
import { Link } from 'react-router'
-import { APP } from '~/configs/meta'
+import { BANNER } from '~/data/contents'
export const Banner = () => {
+ const [emblaReference] = useEmblaCarousel({ loop: false })
+
return (
-
+
-
-

-
+
+ {BANNER.map(({ urlImage, alt, link }, index) => (
+
+
+

+
+
+ ))}
+
+
)
diff --git a/app/data/contents.ts b/app/data/contents.ts
index b849bfa..9e45504 100644
--- a/app/data/contents.ts
+++ b/app/data/contents.ts
@@ -1,4 +1,9 @@
import type { TNews } from '~/types/news'
+type TBanner = {
+ urlImage: string
+ alt: string
+ link: string
+}
export const DUMMY_DESCRIPTION = 'Berita Terhangat hari ini'
@@ -147,3 +152,21 @@ export const KAJIAN: TNews = {
},
],
}
+
+export const BANNER: TBanner[] = [
+ {
+ urlImage: '/images/banner.png',
+ alt: 'banner',
+ link: '/category/spotlight',
+ },
+ {
+ urlImage: 'https://placehold.co/1000x65.png',
+ alt: 'banner',
+ link: '/#',
+ },
+ {
+ urlImage: '/images/banner.png',
+ alt: 'banner',
+ link: '/#',
+ },
+]