Skip to content

Commit

Permalink
fix(production): update production url to scanr
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihoub2 committed Oct 28, 2024
1 parent f25dfd2 commit 43cfeb9
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<>
<Link
Expand All @@ -16,7 +22,7 @@ export const ExternalLinks = ({ productionId, name }) => {
}`}
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
Expand All @@ -34,7 +40,6 @@ export const ExternalLinks = ({ productionId, name }) => {
Editeur
</Link>
)}

<Link
className={`fr-ml-2w fr-footer__content-link ${
google ? "clicked-link" : ""
Expand Down

0 comments on commit 43cfeb9

Please sign in to comment.