Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 8478 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
8468 stevensc 1
import React, { useState } from 'react'
15062 stevensc 2
import IndustryModal from './IndustryModal'
6025 stevensc 3
 
15062 stevensc 4
const Industry = ({ industry, industryUrl, title }) => {
6025 stevensc 5
 
15062 stevensc 6
	const [isShowModal, setIsShowModal] = useState(false)
7
	const [industryState, setIndustryState] = useState(industry)
8467 stevensc 8
 
15062 stevensc 9
	const closeModal = () => setIsShowModal(false)
10
	const showModal = () => setIsShowModal(true)
8467 stevensc 11
 
15062 stevensc 12
	return (
13
		<>
14
			<div className="user-profile-ov">
15
				<h3>
16
					{title}
17
					<button
18
						className="btn btn-industry-edit"
19
						onClick={showModal}
20
					>
21
						<i className="fa fa-pencil" />
22
					</button>
23
				</h3>
24
				<span id="overview-industry">{industryState}</span>
25
			</div>
26
			<IndustryModal
27
				action={setIndustryState}
28
				editUrl={industryUrl}
29
				closeModal={closeModal}
30
				isOpen={isShowModal}
31
			/>
32
		</>
33
	)
6025 stevensc 34
}
35
 
36
export default Industry