Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev Autor Línea Nro. Línea
5949 stevensc 1
import React, { useState } from 'react'
2
import CoverModal from './CoverModal'
5925 stevensc 3
 
5949 stevensc 4
const CoverSection = ({ companyId, cover, coverUploadUrl }) => {
5
 
6
    const [isShowModal, setIsShowModal] = useState(false);
7
 
8
    const closeModal = () => setIsShowModal(false)
9
    const showModal = () => setIsShowModal(true)
10
 
11
 
5925 stevensc 12
    return (
5949 stevensc 13
        <>
14
            <div className="row">
15
                <div className="col-12">
16
                    <section className="cover-sec">
17
                        <img
18
                            id="user-cover-img"
19
                            src={
20
                                cover
21
                                    ? `/storage/type/company-cover/code/${companyId}/filename/${cover}`
22
                                    : ''
23
                            }
24
                            alt=""
25
                        />
26
                        <div className="add-pic-box change-cover-image">
27
                            <div className="container">
28
                                <div className="row no-gutters">
29
                                    <div className="col-lg-12 col-sm-12">
30
                                        <button
31
                                            className="btn btn-cover-open"
32
                                            onClick={showModal}
33
                                        >
34
                                            <i className="fa fa-camera"></i>
35
                                        </button>
36
                                    </div>
5925 stevensc 37
                                </div>
38
                            </div>
39
                        </div>
5949 stevensc 40
                    </section>
41
                </div>
5925 stevensc 42
            </div>
5949 stevensc 43
            <CoverModal
44
                isOpen={isShowModal}
45
                coverUploadUrl={coverUploadUrl}
46
                closeModal={closeModal}
47
            />
48
        </>
5925 stevensc 49
    )
50
}
51
 
52
export default CoverSection