feat: update Autoplay settings in Banner component to prevent stopping on interaction

This commit is contained in:
Ardeman 2025-03-24 13:24:24 +08:00
parent 63bbf70bd6
commit e81dad4ec5

View File

@ -8,7 +8,11 @@ import type { loader } from '~/routes/_news'
export const Banner = () => {
const loaderData = useRouteLoaderData<typeof loader>('routes/_news')
const { adsData } = loaderData || {}
const [emblaReference] = useEmblaCarousel({ loop: true }, [Autoplay()])
const [emblaReference] = useEmblaCarousel({ loop: true }, [
Autoplay({
stopOnInteraction: false,
}),
])
const fetcher = useFetcher()
return (