Я не знаю, за что может быть ответственность такое поведение, поскольку мой код не выдает никаких ошибок, что затрудняет отладку. Пожалуйста, помогите, я могу что-нибудь сделать, чтобы исправить эту ситуацию.
Вот мой компонент баннера:
Код: Выделить всё
"use client";
import Slider from "react-slick";
import Image from "next/image";
import BannerText from "./BannerText";
import bannerone from "@/images/bannerone.jpg";
import bannertwo from "@/images/bannertwo.jpg";
import bannerthree from "@/images/bannerthree.jpg";
import { PiCaretLeftLight, PiCaretRightLight } from "react-icons/pi";
const Banner = () => {
const NextArrow = (props: any) => {
const { onClick } = props;
return (
className="p-3 bg-slate-100 hover:text-orange-600 hover:bg-white cursor-pointer duration-200 rounded-full text-2xl flex items-center justify-center z-20 absolute left-5 top-1/2"
onClick={onClick}
>
);
};
const PrevArrow = (props: any) => {
const { onClick } = props;
return (
className="p-3 bg-slate-100 hover:text-orange-600 hover:bg-white cursor-pointer duration-200 rounded-full text-2xl flex items-center justify-center z-20 absolute right-5 top-1/2"
onClick={onClick}
>
);
};
let settings = {
dots: false,
infinite: false,
autoplay: true,
slidesToShow: 1,
slidesToScroll: 1,
arrows: true,
nextArrow: ,
prevArrow: ,
};
return (
);
};
export default Banner;
Код: Выделить всё
import Container from "./Container";
import { motion } from "framer-motion";
interface Props {
title: string;
}
const BannerText = ({ title }: Props) => {
return (
{title}
Stock up on sportswear and limited edition collections on our
{" "}
awesome mid-season sale.
Find out more
Shop Now
);
};
export default BannerText;
Подробнее здесь: https://stackoverflow.com/questions/784 ... -on-one-of