From 8e3221bc180585dea6d06bf424f5fa7461e76c2a Mon Sep 17 00:00:00 2001 From: Edwin Guzman Date: Mon, 6 May 2024 13:36:34 -0400 Subject: [PATCH] Using the reverse proxy env var to use a regular link or react-router for navigation --- src/app/components/BibPage/BibDetails.jsx | 46 +++++++++++------------ 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/src/app/components/BibPage/BibDetails.jsx b/src/app/components/BibPage/BibDetails.jsx index 6f6376fb5..00db8aba5 100644 --- a/src/app/components/BibPage/BibDetails.jsx +++ b/src/app/components/BibPage/BibDetails.jsx @@ -291,30 +291,28 @@ const BibDetails = (props) => { router.push(`${appConfig.baseUrl}/search?${query}`); }; - return ( - - {/* In the reverse proxy state, we want to navigate to the page and - cause a refresh. Otherwise, we want to use react-router to - stay within the app. This is to work with the new - Research Catalog update. */} - {appConfig.reverseProxyEnabled ? ( - - {label} - - ) : ( - - {label} - - )} - + // In the reverse proxy state, we want to navigate to the page and + // cause a refresh. Otherwise, we want to use react-router to + // stay within the app. This is to work with the new + // Research Catalog update. + return (appConfig.reverseProxyEnabled ? ( + + {label} + + ) : ( + + {label} + + ) ); };