Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev Autor Línea Nro. Línea
4504 stevensc 1
/* eslint-disable react/prop-types */
4500 stevensc 2
import React, { useState } from 'react'
4502 stevensc 3
import EastIcon from '@mui/icons-material/East';
4500 stevensc 4
import parse from "html-react-parser";
5
 
6
const AboutGroup = (groupInfo) => {
7
    const [showModal, setShowModal] = useState(false)
8
 
9
    const openModal = (e) => {
10
        e.preventDefault();
11
        setShowModal(true)
12
    }
13
 
14
    return (
4504 stevensc 15
        <>
16
            <div className='suggest__widget'>
17
                <div className="linked__widget-header">
18
                    <h3>About this group</h3>
19
                </div>
20
                {groupInfo.overview && parse(groupInfo.overview)}
21
                <a className="load__suggest" onClick={(e) => openModal(e)}>
22
                    <span>Ver más</span>
23
                    <EastIcon />
24
                </a>
25
            </div >
4507 stevensc 26
            <AboutGroup.Modal show={showModal} closeModal={() => setShowModal(false)} />
4504 stevensc 27
        </>
4500 stevensc 28
    )
29
}
30
 
4507 stevensc 31
const Modal = ({ show, closeModal }) => {
4504 stevensc 32
 
33
    return (
34
        <Modal
35
            show={show}
36
            onHide={closeModal}
37
        >
38
            <Modal.Header closeButton />
39
        </Modal>
40
    )
41
}
42
 
43
AboutGroup.Modal = Modal
44
 
4500 stevensc 45
export default AboutGroup