diff --git a/src/app/(investment)/deals/[id]/displayImage.tsx b/src/app/(investment)/deals/[id]/displayImage.tsx index 0e28f72..b1b6557 100644 --- a/src/app/(investment)/deals/[id]/displayImage.tsx +++ b/src/app/(investment)/deals/[id]/displayImage.tsx @@ -11,25 +11,31 @@ import { import Image from "next/image"; import { StaticImport } from "next/dist/shared/lib/get-img-props"; +interface ItemProps { + src: string | StaticImport; + alt: string; + width: number; + height: number; +} -const ImageModal = ({ item, width }: { item: { src: string | StaticImport; alt: string;} }, number ) => { +const ImageModal = ({ src, alt, width, height }: ItemProps) => { return ( - {item.alt} + {alt} - + Image Preview Click outside to close the image preview. - {item.alt} + {alt} ); }; -export function DisplayFullImage({ item }: { item: { src: string | StaticImport; alt: string; width: number; height: number } }) { - return ; +export function DisplayFullImage({ src, alt, width, height }: ItemProps) { + return ; } diff --git a/src/app/(investment)/deals/[id]/page.tsx b/src/app/(investment)/deals/[id]/page.tsx index 83b7779..cc6dc13 100644 --- a/src/app/(investment)/deals/[id]/page.tsx +++ b/src/app/(investment)/deals/[id]/page.tsx @@ -49,7 +49,6 @@ export default async function ProjectDealPage({ params }: { params: { id: number alt: `${projectData.project_name} Image`, }); - return (
@@ -92,7 +91,9 @@ export default async function ProjectDealPage({ params }: { params: { id: number {carouselData.map((item, index) => ( - + + + ))}