From 42fece96024b24eac88a2c7aebcda9203dd39c9b Mon Sep 17 00:00:00 2001 From: James McLaughlin Date: Mon, 17 Jun 2024 14:27:39 +0100 Subject: [PATCH] fix frontend generic paths (OBOFoundry/purl.obolibrary.org#987) --- frontend/src/App.tsx | 18 +++++++++++++++--- frontend/src/components/Header.tsx | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 2dd8e5107..32e1a914e 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -21,6 +21,7 @@ import EntityPage from "./pages/ontologies/entities/EntityPage"; import { getEntity } from "./pages/ontologies/ontologiesSlice"; import Search from "./pages/search/Search"; import {Helmet} from "react-helmet"; +import LoadingOverlay from "./components/LoadingOverlay"; class App extends React.Component { render() { @@ -100,6 +101,17 @@ export default App; function RedirectToClasses() { const params = useParams(); const [search] = useSearchParams(); + const entityIri = search.get("iri") + if(entityIri) { + return ( + + ); + } return ( ); } else { - return ; + return } } diff --git a/frontend/src/components/Header.tsx b/frontend/src/components/Header.tsx index d2b83b596..643a5315b 100644 --- a/frontend/src/components/Header.tsx +++ b/frontend/src/components/Header.tsx @@ -16,7 +16,7 @@ export default function Header({ section }: { section?: string }) { > - {caps(section)} - Ontology Lookup Service + {caps(section || 'Not Found')} - Ontology Lookup Service