Rev 8474 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import React, { useState } from 'react'
import IndustryModal from './IndustryModal';
const Industry = ({ industry, industryUrl }) => {
const [isShowModal, setIsShowModal] = useState(false);
const [industryState, setIndustryState] = useState(industry);
const closeModal = () => setIsShowModal(false)
const showModal = () => setIsShowModal(true)
return (
<>
<div className="user-profile-ov">
<h3>
Industria
<button
className="btn btn-industry-edit"
onClick={showModal}
>
<i className="fa fa-pencil" />
</button>
</h3>
<span id="overview-industry">{industryState}</span>
</div>
<IndustryModal
action={setIndustryState}
editUrl={industryUrl}
closeModal={closeModal}
isOpen={isShowModal}
/>
</>
)
}
export default Industry