Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev Autor Línea Nro. Línea
6310 stevensc 1
import React, { useState } from 'react'
6309 stevensc 2
import WebPageModal from './WebPageModal'
6050 stevensc 3
 
6309 stevensc 4
const WebPage = ({ website, websiteUrl }) => {
6050 stevensc 5
 
6309 stevensc 6
    const [isShowModal, setIsShowModal] = useState(false);
7
    const [websiteState, setWebsiteState] = useState(website);
8
 
9
    const closeModal = () => setIsShowModal(false)
10
    const showModal = () => setIsShowModal(true)
11
 
12
 
6050 stevensc 13
    return (
6309 stevensc 14
        <>
15
            <div className="user-profile-ov">
16
                <h3>
17
                    Página web
18
                    <button
19
                        className="btn btn-website-edit"
20
                        onClick={showModal}
21
                    >
22
                        <i className="fa fa-pencil" />
23
                    </button>
24
                </h3>
25
                <span id="overview-website">
26
                    {websiteState}
27
                </span>
28
            </div>
29
            <WebPageModal
30
                isOpen={isShowModal}
31
                websiteUrl={websiteUrl}
32
                closeModal={closeModal}
33
                action={setWebsiteState}
34
            />
35
        </>
6050 stevensc 36
    )
37
}
38
 
39
export default WebPage