Skip to content

Commit

Permalink
Change institution to institutionId
Browse files Browse the repository at this point in the history
  • Loading branch information
hams7504 authored Dec 6, 2023
1 parent 1b332a3 commit 6c1352b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/DatasetSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const DatasetSearch = (props) => {
const [datasets, setDatasets] = useState([]);
const [loading, setLoading] = useState(true);
const user = Storage.getCurrentUser();
const institution = user.institution?.id;
const institutionId = user.institution?.id;
const institutionName = user.institution?.name;

// branded study table versions
Expand Down Expand Up @@ -106,7 +106,7 @@ export const DatasetSearch = (props) => {
title: 'eLwazi Data Library',
},
'myinstitution': {
query: user.isSigningOfficial ? signingOfficialQuery(institution) : myInstitutionQuery(institution),
query: user.isSigningOfficial ? signingOfficialQuery(institutionId) : myInstitutionQuery(institutionId),
icon: null,
title: institutionName + ' Data Library',
},
Expand Down Expand Up @@ -176,7 +176,7 @@ export const DatasetSearch = (props) => {
}
}
};
if (institution === undefined && key === 'myinstitution') {
if (institutionId === undefined && key === 'myinstitution') {
Notifications.showError({ text: 'You must set an institution in your profile to view the `myinstitution` data library' });
props.history.push('/profile');
return;
Expand Down

0 comments on commit 6c1352b

Please sign in to comment.