import React, { useState, useRef, useEffect } from "react";
import Link from "next/link";
import Image from "next/image";
import styles from "../css/SlidingGallery.module.css";
const views = [
{
id: "1",
content: (
Meet, Share, and Learn!
Join Facebook Community
),
},
];
const SlidingGallery = () => {
const [activeIdx, setActiveIdx] = useState(0);
const scrollRef = useRef(null);
const handleScroll = (event) => {
const scrollLeft = event.target.scrollLeft;
const slideWidth = event.target.clientWidth;
const index = Math.round(scrollLeft / slideWidth);
setActiveIdx(index);
};
return (
{views.map((item) => (
{item.content}
))}
{views.map((_, index) => (
))}
);
};
export default SlidingGallery;