diff --git a/client/modules/datafiles/src/nees/NeesDetails.tsx b/client/modules/datafiles/src/nees/NeesDetails.tsx index 2ceef5f2b..c1f057af5 100644 --- a/client/modules/datafiles/src/nees/NeesDetails.tsx +++ b/client/modules/datafiles/src/nees/NeesDetails.tsx @@ -58,7 +58,9 @@ export const NeesDetails: React.FC<{ neesId: string }> = ({ neesId }) => { const neesExperiments = data?.metadata.experiments; const numDOIs = neesExperiments?.filter((exp) => !!exp.doi).length || 0; const routeParams = useParams(); - const path = routeParams.path ?? data?.path; + let path = routeParams.path ?? data?.path; + // Fix for legacy URLs. /Experiment-1 -> /NEES-001.groups/Experiment-1 + if (path) path = path.includes(neesId) ? path : `/${neesId}.groups/${path}`; const [activeTab, setActiveTab] = useState('files'); useEffect(() => setActiveTab('files'), [path]);