From 2b17cb3b076635ec33052b997b65aad53a7bd38c Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Mon, 2 Dec 2024 18:20:34 -0800 Subject: [PATCH] removing some comments and the error condition --- packages/openneuro-app/src/scripts/users/user-query.tsx | 2 -- packages/openneuro-app/src/scripts/users/user-routes.tsx | 7 +------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/openneuro-app/src/scripts/users/user-query.tsx b/packages/openneuro-app/src/scripts/users/user-query.tsx index 36c1826e3..af8fc5cdc 100644 --- a/packages/openneuro-app/src/scripts/users/user-query.tsx +++ b/packages/openneuro-app/src/scripts/users/user-query.tsx @@ -31,7 +31,6 @@ const dummyUsers: Record = { }, }; -// Default user data for invalid or unknown users const getDefaultUser = (orcid: string) => ({ id: 'unknown', name: 'Unknown User', @@ -40,7 +39,6 @@ const getDefaultUser = (orcid: string) => ({ orcid, }); -// Function to get the user based on ORCID const getUserByOrcid = (orcid: string) => dummyUsers[orcid] || getDefaultUser(orcid); // Helper function to validate ORCID format diff --git a/packages/openneuro-app/src/scripts/users/user-routes.tsx b/packages/openneuro-app/src/scripts/users/user-routes.tsx index 775ca3273..8c0ca9d84 100644 --- a/packages/openneuro-app/src/scripts/users/user-routes.tsx +++ b/packages/openneuro-app/src/scripts/users/user-routes.tsx @@ -10,15 +10,10 @@ import FourOThreePage from "../errors/403page"; // Define types for the props interface UserRoutesProps { user: any; - error?: Error; // Optional error prop hasEdit: boolean; } -export const UserRoutes: React.FC = ({ user, error, hasEdit }) => { - if (error) { - throw error; // Optionally, handle error more gracefully based on your use case - } - +export const UserRoutes: React.FC = ({ user, hasEdit }) => { return ( } />