diff --git a/src/app/(investment)/deals/[id]/displayImage.tsx b/src/app/(investment)/deals/[id]/displayImage.tsx new file mode 100644 index 0000000..7e48f8b --- /dev/null +++ b/src/app/(investment)/deals/[id]/displayImage.tsx @@ -0,0 +1,35 @@ +"use client"; +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, + DialogTrigger, +} from "@/components/ui/dialog"; +import Image from "next/image"; +import { StaticImport } from "next/dist/shared/lib/get-img-props"; +import { it } from "node:test"; + +const ImageModal = ({ item, width }: { item: { src: string | StaticImport; alt: string;} }, number ) => { + return ( + + + {item.alt} + + + + Image Preview + Click outside to close the image preview. + + {item.alt} + + + + ); +}; + +export function DisplayFullImage({ item }: { item: { src: string | StaticImport; alt: string; width: number; height: number } }) { + return ; +} diff --git a/src/app/(investment)/deals/[id]/followShareButton.tsx b/src/app/(investment)/deals/[id]/followShareButton.tsx index ed34336..9242b98 100644 --- a/src/app/(investment)/deals/[id]/followShareButton.tsx +++ b/src/app/(investment)/deals/[id]/followShareButton.tsx @@ -10,8 +10,6 @@ import useSession from "@/lib/supabase/useSession"; import toast from "react-hot-toast"; const FollowShareButtons = () => { - const [progress, setProgress] = useState(0); - const [tab, setTab] = useState("Pitch"); const { session, loading } = useSession(); const user = session?.user; const [sessionLoaded, setSessionLoaded] = useState(false); diff --git a/src/app/(investment)/deals/[id]/page.tsx b/src/app/(investment)/deals/[id]/page.tsx index f99fc58..83b7779 100644 --- a/src/app/(investment)/deals/[id]/page.tsx +++ b/src/app/(investment)/deals/[id]/page.tsx @@ -11,6 +11,7 @@ import { Progress } from "@/components/ui/progress"; import { Separator } from "@/components/ui/separator"; import { createSupabaseClient } from "@/lib/supabase/serverComponentClient"; import FollowShareButtons from "./followShareButton"; +import { DisplayFullImage } from "./displayImage"; import { getProjectData } from "@/lib/data/projectQuery"; import { getDealList } from "@/app/api/dealApi"; @@ -19,7 +20,6 @@ import { redirect } from "next/navigation"; export default async function ProjectDealPage({ params }: { params: { id: number } }) { const supabase = createSupabaseClient(); - const { data: projectData, error: projectDataError } = await getProjectData(supabase, params.id); if (!projectData) { @@ -49,6 +49,7 @@ export default async function ProjectDealPage({ params }: { params: { id: number alt: `${projectData.project_name} Image`, }); + return (
@@ -91,7 +92,7 @@ export default async function ProjectDealPage({ params }: { params: { id: number {carouselData.map((item, index) => ( - {item.alt} + ))} @@ -140,7 +141,9 @@ export default async function ProjectDealPage({ params }: { params: { id: number
- Pitch + + Pitch + General Data Updates