Created
July 26, 2019 10:01
-
-
Save CITGuru/f587247dd60d4d68cb1e2d33d804d13d to your computer and use it in GitHub Desktop.
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
import React from 'react' | |
import PropTypes from 'prop-types' | |
const UserInformation = props => { | |
const { | |
modalOpen, | |
selected, | |
setSelected, | |
setModalState | |
} = useModalWithData() | |
const {data} = props | |
return ( | |
<div> | |
<div style={{ padding: '1rem' }} /> | |
<CustomModal | |
title="User Detail" | |
isActive={modalOpen} | |
handleClose={() => setModalState(false)} | |
> | |
<UserDetail data={selected} /> | |
</CustomModal> | |
<UserTable | |
data={data} | |
setSelected={setSelected} | |
setModalState={setModalState} | |
/> | |
</div> | |
) | |
} | |
UserInformation.propTypes = { | |
data: PropTypes.object.isRequired, | |
} | |
export default UserInformation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment