diff --git a/client/src/pages/api-operation-page/link-publications/external-links.tsx b/client/src/pages/api-operation-page/link-publications/external-links.tsx index 8a4a81c..93274f7 100644 --- a/client/src/pages/api-operation-page/link-publications/external-links.tsx +++ b/client/src/pages/api-operation-page/link-publications/external-links.tsx @@ -8,6 +8,12 @@ export const ExternalLinks = ({ productionId, name }) => { const [scanRClicked, setScanRClicked] = useState(false); const [landingPageClicked, setLandingPageClicked] = useState(false); const { landingPage } = LandingPage(productionId); + + const scanRPath = + formattedProductionId.length >= 7 && formattedProductionId.length <= 9 + ? "patents" + : "publications"; + return ( <> { }`} target="_blank" rel="noreferrer noopener external" - href={`https://scanr.enseignementsup-recherche.gouv.fr/publications/${formattedProductionId}`} + href={`https://scanr.enseignementsup-recherche.gouv.fr/${scanRPath}/${formattedProductionId}`} onClick={() => setScanRClicked(true)} > scanR @@ -34,7 +40,6 @@ export const ExternalLinks = ({ productionId, name }) => { Editeur )} -