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 Image from "next/image";
|
||||||
import { FaCircleChevronLeft, FaCircleChevronRight } from "react-icons/fa6";
|
import { FaCircleChevronLeft, FaCircleChevronRight } from "react-icons/fa6";
|
||||||
import { AiOutlineClose } from "react-icons/ai";
|
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 [slideNumber, setSlideNumber] = useState(0);
|
||||||
const [openModal, setOpenModal] = useState(false);
|
const [openModal, setOpenModal] = useState(false);
|
||||||
|
|
||||||
const handleOpenModal = (index) => {
|
const handleOpenModal = (index: any) => {
|
||||||
setSlideNumber(index);
|
setSlideNumber(index);
|
||||||
setOpenModal(true);
|
setOpenModal(true);
|
||||||
};
|
};
|
||||||
@ -42,7 +43,6 @@ const WSPGallery = ({ galleryImages }) => {
|
|||||||
fill
|
fill
|
||||||
style={{ objectFit: "contain" }}
|
style={{ objectFit: "contain" }}
|
||||||
className="cursor-pointer"
|
className="cursor-pointer"
|
||||||
onClick={() => handleOpenModal(index)}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -50,7 +50,7 @@ const WSPGallery = ({ galleryImages }) => {
|
|||||||
|
|
||||||
<div className="galleryWrap">
|
<div className="galleryWrap">
|
||||||
{galleryImages &&
|
{galleryImages &&
|
||||||
galleryImages.map((slide, index) => {
|
galleryImages.map((slide: { img: string | StaticImport; }, index: React.Key | null | undefined) => {
|
||||||
return (
|
return (
|
||||||
<div className="single w-[200px] " key={index}>
|
<div className="single w-[200px] " key={index}>
|
||||||
<Image
|
<Image
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user