-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "refactor: switch CollaboratorRow to JSX"
This reverts commit 4b96db7.
- Loading branch information
Showing
1 changed file
with
15 additions
and
21 deletions.
There are no files selected for viewing
36 changes: 15 additions & 21 deletions
36
src/pages/dar_application/collaborator/CollaboratorRow.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,28 @@ | ||
import React from 'react'; | ||
import { CollaboratorSummary } from './CollaboratorSummary'; | ||
import { div, h } from 'react-hyperscript-helpers'; | ||
import CollaboratorForm from './CollaboratorForm'; | ||
|
||
export const CollaboratorRow = (props) => { | ||
const { | ||
index, | ||
validation, | ||
onCollaboratorValidationChange, | ||
collaborator, | ||
editMode, | ||
} = props; | ||
|
||
return ( | ||
<div id={index + '_collaboratorForm'}> | ||
<CollaboratorForm | ||
{...props} | ||
collaborator={collaborator} | ||
index={index} | ||
isRendered={editMode === true} | ||
validation={validation} | ||
onCollaboratorValidationChange={onCollaboratorValidationChange} | ||
/> | ||
<CollaboratorSummary | ||
{...props} | ||
collaborator={collaborator} | ||
index={index} | ||
isRendered={!editMode} | ||
/> | ||
</div> | ||
); | ||
return div({id: index+'_collaboratorForm'}, [ | ||
h(CollaboratorForm, { | ||
...props, | ||
collaborator: props.collaborator, index: index, | ||
isRendered: props.editMode === true, | ||
validation, | ||
onCollaboratorValidationChange | ||
}), | ||
h(CollaboratorSummary, { | ||
...props, | ||
collaborator: props.collaborator, index: index, | ||
isRendered: !props.editMode | ||
}) | ||
]); | ||
}; | ||
|
||
export default CollaboratorRow; |