import { useEffect } from "react" import styles from "./box-office.module.scss" const BoxOffice = () => { useEffect(() => { let items = document.querySelectorAll('.carousel .carousel-item') console.log("item", items) items.forEach((el) => { console.log("el", el) const minPerSlide = 4 let next = el.nextElementSibling for (let i = 1; i < minPerSlide; i++) { if (!next) { next = items[0] } let cloneChild = next.cloneNode(true) el.appendChild(cloneChild.children[0]) next = next.nextElementSibling } }) }, []) return (