Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 8474 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
8468 stevensc 1
import React, { useState } from 'react'
8467 stevensc 2
import IndustryModal from './IndustryModal';
6025 stevensc 3
 
8467 stevensc 4
const Industry = ({ industry, industryUrl }) => {
6025 stevensc 5
 
8467 stevensc 6
    const [isShowModal, setIsShowModal] = useState(false);
7
    const [industryState, setIndustryState] = useState(industry);
8
 
9
    const closeModal = () => setIsShowModal(false)
10
    const showModal = () => setIsShowModal(true)
11
 
6025 stevensc 12
    return (
8467 stevensc 13
        <>
14
            <div className="user-profile-ov">
15
                <h3>
16
                    Industria
17
                    <button
18
                        className="btn btn-industry-edit"
8478 stevensc 19
                        onClick={showModal}
8467 stevensc 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
        </>
6025 stevensc 33
    )
34
}
35
 
36
export default Industry