From b3dd33a5768feb09ff670a3d6580a4bded7b81c9 Mon Sep 17 00:00:00 2001 From: learner97 Date: Mon, 25 Mar 2024 16:53:04 -0600 Subject: [PATCH] added styling to similar button, added sbolexplorer check for similar, needs updating --- frontend/components/Viewing/ViewHeader.js | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/frontend/components/Viewing/ViewHeader.js b/frontend/components/Viewing/ViewHeader.js index 1a345b99..9918ede6 100644 --- a/frontend/components/Viewing/ViewHeader.js +++ b/frontend/components/Viewing/ViewHeader.js @@ -177,6 +177,21 @@ export default function ViewHeader(properties) { setIsEditingTitle(false); }; + const checkSBOLExplorer = () => { + axios.get(`${publicRuntimeConfig.backend}/admin/explorer`, { + headers: { + "Accept": "text/plain; charset=UTF-8", + "X-authorization": token + } + }) + .then(response => { + console.log(response.data); + }) + .catch(error => { + console.error('Error checking SBOLExplorer:', error); + }); + }; + return (
@@ -235,7 +250,7 @@ export default function ViewHeader(properties) {
-
0 ? "Find all records with terms in common with this description" : ""}> {isEditingDescription ? (
@@ -280,8 +295,8 @@ export default function ViewHeader(properties) { )}
- {properties.search.similar && ( //TODO: Add check for SBOLExplorer - + {properties.search.similar && checkSBOLExplorer?.data?.includes('SBOLExplorer') && ( //TODO: Add check for SBOLExplorer + )} {properties.search.twins && (