From 24b61c567cdbb29524d753ea0ead40f284ceff0d Mon Sep 17 00:00:00 2001 From: Nell Hardcastle Date: Tue, 21 May 2024 09:57:58 -0700 Subject: [PATCH] fix(app): Show 404 pages on more invalid route paths (root and error pages) --- .../src/scripts/errors/errorRoute.jsx | 28 +++++++++---------- packages/openneuro-app/src/scripts/routes.tsx | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/openneuro-app/src/scripts/errors/errorRoute.jsx b/packages/openneuro-app/src/scripts/errors/errorRoute.jsx index 5216c688e..08f836115 100644 --- a/packages/openneuro-app/src/scripts/errors/errorRoute.jsx +++ b/packages/openneuro-app/src/scripts/errors/errorRoute.jsx @@ -7,22 +7,22 @@ import OrcidGeneral from "./orcid/general.jsx" import OrcidEmail from "./orcid/email.jsx" import OrcidGiven from "./orcid/given.jsx" import OrcidFamily from "./orcid/family.jsx" +import FourOFourPage from "./404page" -class ErrorRoute extends React.Component { - render() { - return ( -
-
- - } /> - } /> - } /> - } /> - -
+function ErrorRoute() { + return ( +
+
+ + } /> + } /> + } /> + } /> + } /> +
- ) - } +
+ ) } export default ErrorRoute diff --git a/packages/openneuro-app/src/scripts/routes.tsx b/packages/openneuro-app/src/scripts/routes.tsx index 86ee84012..9fd0d25b9 100644 --- a/packages/openneuro-app/src/scripts/routes.tsx +++ b/packages/openneuro-app/src/scripts/routes.tsx @@ -39,7 +39,7 @@ const AppRoutes: React.VoidFunctionComponent = () => ( path="/dashboard" element={} /> - } /> + } /> )