fixed type errors
This commit is contained in:
parent
5cd0849363
commit
914209e5e9
@ -4,12 +4,13 @@ import "./wspgallery.css";
|
||||
import Image from "next/image";
|
||||
import { FaCircleChevronLeft, FaCircleChevronRight } from "react-icons/fa6";
|
||||
import { AiOutlineClose } from "react-icons/ai";
|
||||
import { StaticImport } from "next/dist/shared/lib/get-img-props";
|
||||
|
||||
const WSPGallery = ({ galleryImages }) => {
|
||||
const WSPGallery = ({ galleryImages }: any) => {
|
||||
const [slideNumber, setSlideNumber] = useState(0);
|
||||
const [openModal, setOpenModal] = useState(false);
|
||||
|
||||
const handleOpenModal = (index) => {
|
||||
const handleOpenModal = (index: any) => {
|
||||
setSlideNumber(index);
|
||||
setOpenModal(true);
|
||||
};
|
||||
@ -42,7 +43,6 @@ const WSPGallery = ({ galleryImages }) => {
|
||||
fill
|
||||
style={{ objectFit: "contain" }}
|
||||
className="cursor-pointer"
|
||||
onClick={() => handleOpenModal(index)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@ -50,7 +50,7 @@ const WSPGallery = ({ galleryImages }) => {
|
||||
|
||||
<div className="galleryWrap">
|
||||
{galleryImages &&
|
||||
galleryImages.map((slide, index) => {
|
||||
galleryImages.map((slide: { img: string | StaticImport; }, index: React.Key | null | undefined) => {
|
||||
return (
|
||||
<div className="single w-[200px] " key={index}>
|
||||
<Image
|
||||
|
||||
Loading…
Reference in New Issue
Block a user