Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug/WC-33: Fix NEES DOI links by appending project root to paths #1438

Merged
merged 3 commits into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion client/modules/datafiles/src/nees/NeesDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>('files');
useEffect(() => setActiveTab('files'), [path]);
Expand Down
Loading