refactor: integrate autoplay functionality in Banner and enhance news data handling

This commit is contained in:
Ardeman
2025-03-09 14:32:04 +08:00
parent 550b16cfd3
commit e7eda086e4
5 changed files with 40 additions and 5 deletions
+2 -1
View File
@@ -1,10 +1,11 @@
import Autoplay from 'embla-carousel-autoplay'
import useEmblaCarousel from 'embla-carousel-react'
import { Link } from 'react-router'
import { BANNER } from '~/data/contents'
export const Banner = () => {
const [emblaReference] = useEmblaCarousel({ loop: false })
const [emblaReference] = useEmblaCarousel({ loop: true }, [Autoplay()])
return (
<div className="">