Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slick Infante is not working #2378

Open
EsraaAbuAmer opened this issue May 16, 2024 · 1 comment
Open

Slick Infante is not working #2378

EsraaAbuAmer opened this issue May 16, 2024 · 1 comment

Comments

@EsraaAbuAmer
Copy link

import React from "react";
import ScrollAnimation from "react-animate-on-scroll";
import { FaRegCircle } from "react-icons/fa";
import SlickSlider from "react-slick";

import { useState, useEffect } from "react";
const SplitFour = ({ img, list, images }) => {
const [isMobile, setIsMobile] = useState(false);
useEffect(() => {
const handleResize = () => {
setIsMobile(window.innerWidth < 768); // Adjust the threshold as needed
};

// Initial check on component mount
handleResize();

// Add event listener for window resize
window.addEventListener("resize", handleResize);

// Clean up the event listener on component unmount
return () => {
  window.removeEventListener("resize", handleResize);
};

}, []);
const settings = {
infinite: true,
slidesToShow: isMobile ? 2 : 6,
slidesToScroll: 1,
autoplay: true,
speed: 2000,
autoplaySpeed: 2000,
pauseOnHover: true,
arrows: false,
};
return (






{/*


Network and data security is a rapidly growing concern for
business across the globe. As cyber-security threats become
more advanced and frequent, it’s critical that companies
defend themselves against crippling attacks and invasive
breaches. EchoServe can work with your security team to
identify potential vulnerabilities


*/}

          <ScrollAnimation
            animateIn="fadeInUp"
            animateOut="fadeInOut"
            animateOnce={false}
          >
            <ul className="split-list">
              {list.map((item) => {
                return (
                  <li>
                    <FaRegCircle
                      className="split-icon"
                      color="#345085"
                      size={15}
                    />
                    {item.point}
                  </li>
                );
              })}
            </ul>
          </ScrollAnimation>
        </div>
        <ScrollAnimation
          animateIn="fadeInUp"
          animateOut="fadeInOut"
          animateOnce={true}
        >
          <div className="slider-container">
            <SlickSlider {...settings}>
              {images?.map((item) => {
                return <img src={item?.img} className="slider_img"></img>;
              })}
            </SlickSlider>
          </div>
        </ScrollAnimation>
      </div>


      <div className="col-lg-12 col-xl-6 col-12">
        <div className="thumbnail image-left-content">
          <img src={img} alt="split Images" />
        </div>
      </div>
    </div>
  </div>
</div>

);
};

export default SplitFour;
this is my code the infinite is not working

@dhanushshettigar
Copy link

Hey @EsraaAbuAmer can you provide a CodeSandBox of your issue so that we can test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants