"use client"; import { use } from 'react'; import Image from "next/legacy/image"; import { useCaseStudy } from "@/lib/hooks/useCaseStudy"; import { getImageUrl } from "@/lib/imageUtils"; import poster from "@/public/images/case/poster.png"; import project from "@/public/images/case/project.png"; import nine from "@/public/images/case/nine.png"; interface CaseSingleProps { slug: string; } const CaseSingle = ({ slug }: CaseSingleProps) => { const { caseStudy, loading, error } = useCaseStudy(slug); if (loading) { return ( Loading case study... ); } if (error || !caseStudy) { return ( Case study not found. ); } return ( {caseStudy.title} {caseStudy.subtitle && ( {caseStudy.subtitle} )} Project {caseStudy.project_overview ? ( {caseStudy.project_overview} ) : ( )} {caseStudy.site_map_content && ( Site Map {caseStudy.site_map_content} )} {caseStudy.gallery_images && caseStudy.gallery_images.length > 0 && ( {caseStudy.gallery_images.map((image) => ( ))} )} ); }; export default CaseSingle;
Loading case study...
Case study not found.
{caseStudy.project_overview}
{caseStudy.site_map_content}