diff --git a/CHANGELOG b/CHANGELOG index 68490d8a0151580af2e86b9fd9a3c0a7a210ca1c..700455fab635434eccb706ae0cdaea04e34dcd80 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,5 @@ minerva-front (18.0.0~beta.3) stable; urgency=medium + * Bugfix: link to download project source was invalid * Bugfix: change background to empty after overlay is loaded so there is no blank background (#285) * Bugfix: license info styling (#280) diff --git a/src/components/Map/Drawer/ProjectInfoDrawer/ProjectInfoDrawer.component.test.tsx b/src/components/Map/Drawer/ProjectInfoDrawer/ProjectInfoDrawer.component.test.tsx index ef21f2dc7f3df531e4a1bc64d988af4546dceac7..1c24ab14aa18f6f2113a54fcf786b178484fa3e2 100644 --- a/src/components/Map/Drawer/ProjectInfoDrawer/ProjectInfoDrawer.component.test.tsx +++ b/src/components/Map/Drawer/ProjectInfoDrawer/ProjectInfoDrawer.component.test.tsx @@ -98,7 +98,7 @@ describe('ProjectInfoDrawer', () => { expect(downloadButton).toBeInTheDocument(); expect(downloadButton).toHaveAttribute( 'href', - 'localhost/projects/pdmap_appu_test:downloadSource', + 'https://lux1.atcomp.pl/minerva/api/projects/pdmap_appu_test:downloadSource', ); expect(downloadButton).toHaveAttribute('download', 'sourceFile.txt'); }); diff --git a/src/components/Map/Drawer/ProjectInfoDrawer/ProjectInfoDrawer.component.tsx b/src/components/Map/Drawer/ProjectInfoDrawer/ProjectInfoDrawer.component.tsx index b19e5bdff8bcb7b92430b17d737a5175efa92170..80c6cd351b1dce422bbc0cec3c861e2f481c1dbf 100644 --- a/src/components/Map/Drawer/ProjectInfoDrawer/ProjectInfoDrawer.component.tsx +++ b/src/components/Map/Drawer/ProjectInfoDrawer/ProjectInfoDrawer.component.tsx @@ -16,6 +16,7 @@ import { DrawerHeading } from '@/shared/DrawerHeading'; import { LinkButton } from '@/shared/LinkButton'; import { useEffect } from 'react'; import './ProjectInfoDrawer.styles.css'; +import { BASE_API_URL } from '@/constants'; export const ProjectInfoDrawer = (): JSX.Element => { const dispatch = useAppDispatch(); @@ -28,7 +29,10 @@ export const ProjectInfoDrawer = (): JSX.Element => { const version = useAppSelector(versionSelector); const description = useAppSelector(mainMapModelDescriptionSelector); - const sourceDownloadLink = window.location.hostname + apiPath.getSourceFile(); + const sourceDownloadLink = BASE_API_URL + apiPath.getSourceFile(); + + // eslint-disable-next-line no-console + console.log(sourceDownloadLink); let licenseName: string = ''; if (project) {