diff --git a/frontend/src/app/satellites/[satelliteSlug]/page.tsx b/frontend/src/app/satellites/[satelliteSlug]/page.tsx index 52bb99a..39e77d4 100644 --- a/frontend/src/app/satellites/[satelliteSlug]/page.tsx +++ b/frontend/src/app/satellites/[satelliteSlug]/page.tsx @@ -23,7 +23,8 @@ export interface ProjectOrSatellite { isProject: boolean; } -const STRAPI_URL = process.env.BACKEND_INTERNAL_URL; +const BACKEND_INTERNAL_URL = process.env.BACKEND_INTERNAL_URL; +const STRAPI_URL = process.env.STRAPI_URL; export default async function SatelliteInfoPage({ params, @@ -80,6 +81,7 @@ export default async function SatelliteInfoPage({ {/* Container for launch date */} diff --git a/frontend/src/app/satellites/[satelliteSlug]/satInfo.tsx b/frontend/src/app/satellites/[satelliteSlug]/satInfo.tsx index f175243..fa2580a 100644 --- a/frontend/src/app/satellites/[satelliteSlug]/satInfo.tsx +++ b/frontend/src/app/satellites/[satelliteSlug]/satInfo.tsx @@ -10,17 +10,19 @@ import { TabProvider } from "../tabContext"; export default function SatInfo({ satAttributes, STRAPI_URL, + BACKEND_INTERNAL_URL, }: { satAttributes: SatAttributes; STRAPI_URL: string | undefined; + BACKEND_INTERNAL_URL: string | undefined; }) { const [imageURL, setImageURL] = useState(undefined); const [is3DModel, setIs3DModel] = useState(false); useEffect(() => { let satelliteImage = satAttributes?.satelliteImage?.data?.attributes?.url; - if (STRAPI_URL && satelliteImage) { - const fullImage = STRAPI_URL + satelliteImage; + if (BACKEND_INTERNAL_URL && satelliteImage) { + const fullImage = BACKEND_INTERNAL_URL + satelliteImage; setImageURL(fullImage); setIs3DModel( satelliteImage.endsWith(".glb") || @@ -28,7 +30,7 @@ export default function SatInfo({ satelliteImage.endsWith(".glb?"), ); } - }, [satAttributes, STRAPI_URL]); + }, [satAttributes, BACKEND_INTERNAL_URL]); return ( <>