Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 6050 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 6050 Rev 6407
Línea 1... Línea 1...
1
import React from 'react'
1
import React, { useState } from 'react'
-
 
2
import FoundationsYearModal from './foundationsYearModal';
-
 
3
 
-
 
4
const YearOfFoundation = ({ foundationYear, foundationYearUrl }) => {
-
 
5
 
-
 
6
    const [isShowModal, setIsShowModal] = useState(false);
-
 
7
    const [foundationYearState, setFoundationYearState] = useState(foundationYear);
-
 
8
 
-
 
9
    const closeModal = () => setIsShowModal(false)
-
 
10
    const showModal = () => setIsShowModal(true)
Línea 2... Línea -...
2
 
-
 
3
const YearOfFoundation = ({ foundationYear }) => {
11
 
-
 
12
    return (
4
    return (
13
        <>
5
        <div className="user-profile-ov">
14
            <div className="user-profile-ov">
6
            <h3>
15
                <h3>
-
 
16
                    Año de fundación
7
                Año de fundación
17
                    <button
-
 
18
                        className="btn btn-foundation-year-edit"
-
 
19
                        onClick={showModal}
8
                <button className="btn btn-foundation-year-edit">
20
                    >
9
                    <i className="fa fa-pencil" />
21
                        <i className="fa fa-pencil" />
10
                </button>
22
                    </button>
11
            </h3>
23
                </h3>
12
            <span id="overview-foundation-year">
24
                <span id="overview-foundation-year">
13
                {foundationYear}
25
                    {foundationYearState}
-
 
26
                </span>
-
 
27
            </div>
-
 
28
            <FoundationsYearModal
-
 
29
                isOpen={isShowModal}
-
 
30
                foundationYearUrl={foundationYearUrl}
-
 
31
                closeModal={closeModal}
-
 
32
                action={setFoundationYearState}
14
            </span>
33
            />
15
        </div>
34
        </>
16
    )
35
    )
Línea 17... Línea 36...
17
}
36
}
18
 
37