Skip to content

Instantly share code, notes, and snippets.

@CITGuru
Created July 26, 2019 10:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CITGuru/f587247dd60d4d68cb1e2d33d804d13d to your computer and use it in GitHub Desktop.
Save CITGuru/f587247dd60d4d68cb1e2d33d804d13d to your computer and use it in GitHub Desktop.
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