diff --git a/src/app/[locale]/applications/[slug]/ApplicationClient.tsx b/src/app/[locale]/applications/[slug]/ApplicationClient.tsx index 223ae8e..e3f9c33 100644 --- a/src/app/[locale]/applications/[slug]/ApplicationClient.tsx +++ b/src/app/[locale]/applications/[slug]/ApplicationClient.tsx @@ -712,8 +712,8 @@ function TechnicalViewer3D({ node, usdzPath }: { node: any; usdzPath: string }) ("overview"); + const nodeSlug = nodeToSlug(node.title); const [lightboxOpen, setLightboxOpen] = useState(false); const [lightboxImages, setLightboxImages] = useState([]); @@ -836,8 +840,8 @@ function ExpandedCaseStudy({ node }: { node: any }) { allImages.push(match[1]); } } - gallery.forEach(img => allImages.push(`/cases/${img}`)); - renders.forEach(ren => allImages.push(`/cases/${ren}`)); + gallery.forEach(img => allImages.push(`/cases/${nodeSlug}/${img}`)); + renders.forEach(ren => allImages.push(`/cases/${nodeSlug}/${ren}`)); if (!allImages.includes(clickedImageUrl)) { allImages.unshift(clickedImageUrl); } @@ -884,7 +888,7 @@ function ExpandedCaseStudy({ node }: { node: any }) {
{videos.map((vid: string, idx: number) => { const isLocalMp4 = vid.endsWith('.mp4'); - const videoSrc = isLocalMp4 && !vid.startsWith('http') ? `/cases/videos/${vid}` : vid; + const videoSrc = isLocalMp4 && !vid.startsWith('http') ? `/cases/${nodeSlug}/videos/${vid}` : vid; return (
{isLocalMp4 ? ( @@ -897,7 +901,7 @@ function ExpandedCaseStudy({ node }: { node: any }) { })} {gallery.map((img: string, idx: number) => { - const fullImgSrc = `/cases/${img}`; + const fullImgSrc = `/cases/${nodeSlug}/${img}`; return (
Installation @@ -968,7 +972,7 @@ function ExpandedCaseStudy({ node }: { node: any }) {
{renders.map((ren: string, idx: number) => { - const fullRenSrc = `/cases/${ren}`; + const fullRenSrc = `/cases/${nodeSlug}/${ren}`; return (
Technical Render @@ -1145,7 +1149,7 @@ export default function ApplicationClient({ data, realCases, images }: { data: a
{node.mediaFileName ? ( - {node.title} + {node.title} ) : ( )}