Skip to content

Commit

Permalink
revert study changes; use default empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
rushtong committed Oct 22, 2023
1 parent 3759524 commit f5770e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
9 changes: 1 addition & 8 deletions src/pages/StudyUpdateForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export const StudyUpdateForm = (props) => {
const [institutions, setInstitutions] = useState([]);
const [allConsentGroupsSaved, setAllConsentGroupsSaved] = useState(false);
const [formFiles, setFormFiles] = useState({});
const [datasetNames, setDatasetNames] = useState([]);
const studyEditMode = true;

useEffect(() => {
Expand All @@ -35,15 +34,9 @@ export const StudyUpdateForm = (props) => {
setInstitutions(institutions);
};

const getAllDatasetNames = async() => {
const datasetNames = await DataSet.getDatasetNames();
setDatasetNames(datasetNames);
};

const init = async () => {
try {
await getAllInstitutions();
await getAllDatasetNames();
} catch (error) {
setFailedInit(true);
Notifications.showError({
Expand Down Expand Up @@ -250,7 +243,7 @@ export const StudyUpdateForm = (props) => {
<NihAnvilUse onChange={onChange} formData={formData} validation={formValidation} onValidationChange={onValidationChange} studyEditMode={studyEditMode}/>
<NIHAdministrativeInformation institutions={institutions} onChange={onChange} formData={formData} validation={formValidation} onValidationChange={onValidationChange} studyEditMode={studyEditMode}/>
<NIHDataManagement onChange={onChange} onFileChange={onFileChange} formData={formData} validation={formValidation} onValidationChange={onValidationChange} studyEditMode={studyEditMode}/>
<DataAccessGovernance onChange={onChange} onFileChange={onFileChange} setAllConsentGroupsSaved={setAllConsentGroupsSaved} datasets={datasets} validation={formValidation} onValidationChange={onValidationChange} studyEditMode={studyEditMode} datasetNames={datasetNames}/>
<DataAccessGovernance onChange={onChange} onFileChange={onFileChange} setAllConsentGroupsSaved={setAllConsentGroupsSaved} datasets={datasets} validation={formValidation} onValidationChange={onValidationChange} studyEditMode={studyEditMode}/>

<div className='flex flex-row' style={{justifyContent: 'flex-end', marginBottom: '2rem'}}>
<a className='button button-white' onClick={submit}>Submit</a>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/data_submission/DataAccessGovernance.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const DataAccessGovernance = (props) => {
datasets,
onValidationChange,
setAllConsentGroupsSaved,
datasetNames
datasetNames = []
} = props;

const [consentGroupsState, setConsentGroupsState] = useState([]);
Expand Down

0 comments on commit f5770e0

Please sign in to comment.