@@ -17,6 +17,7 @@ gsap.registerPlugin(useGSAP, ScrollTrigger);
1717
1818const ProjectDetails = ( { project } : Props ) => {
1919 const containerRef = useRef < HTMLDivElement > ( null ) ;
20+ const basePath = process . env . NEXT_PUBLIC_BASE_PATH ?? '' ;
2021
2122 useGSAP (
2223 ( ) => {
@@ -179,26 +180,30 @@ const ProjectDetails = ({ project }: Props) => {
179180 className = "fade-in-later relative flex flex-col gap-2 max-w-[800px] mx-auto"
180181 id = "images"
181182 >
182- { project . images . map ( ( image ) => (
183+ { project . images . map ( ( image ) => {
184+ const imageUrl = `${ basePath } ${ image } ` ;
185+
186+ return (
183187 < div
184- key = { image }
185- className = "group relative w-full aspect-[750/400] bg-background-light"
186- style = { {
187- backgroundImage : `url(${ image } )` ,
188- backgroundSize : 'contain' ,
189- backgroundPosition : 'center 50%' ,
190- backgroundRepeat : 'no-repeat' ,
191- } }
192- >
193- < a
194- href = { image }
195- target = "_blank"
196- className = "absolute top-4 right-4 bg-background/70 text-foreground size-12 inline-flex justify-center items-center transition-all opacity-0 hover:bg-primary hover:text-primary-foreground group-hover:opacity-100"
188+ key = { image }
189+ className = "group relative w-full aspect-[750/400] bg-background-light"
190+ style = { {
191+ backgroundImage : `url(${ imageUrl } )` ,
192+ backgroundSize : 'contain' ,
193+ backgroundPosition : 'center 50%' ,
194+ backgroundRepeat : 'no-repeat' ,
195+ } }
197196 >
198- < ExternalLink />
199- </ a >
200- </ div >
201- ) ) }
197+ < a
198+ href = { imageUrl }
199+ target = "_blank"
200+ className = "absolute top-4 right-4 bg-background/70 text-foreground size-12 inline-flex justify-center items-center transition-all opacity-0 hover:bg-primary hover:text-primary-foreground group-hover:opacity-100"
201+ >
202+ < ExternalLink />
203+ </ a >
204+ </ div >
205+ ) ;
206+ } ) }
202207 </ div >
203208 </ div >
204209 </ section >
0 commit comments