Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

/* eslint-disable react/prop-types */
import React, { useState } from 'react'
import EastIcon from '@mui/icons-material/East';
import parse from "html-react-parser";

const AboutGroup = (groupInfo) => {
    const [showModal, setShowModal] = useState(false)

    const openModal = (e) => {
        e.preventDefault();
        setShowModal(true)
    }

    return (
        <>
            <div className='suggest__widget'>
                <div className="linked__widget-header">
                    <h3>About this group</h3>
                </div>
                {groupInfo.overview && parse(groupInfo.overview)}
                <a className="load__suggest" onClick={(e) => openModal(e)}>
                    <span>Ver más</span>
                    <EastIcon />
                </a>
            </div >
            <AboutGroup.Modal show={showModal} closeModal={() => setShowModal(false)} />
        </>
    )
}

const Modal = ({ show, closeModal }) => {

    return (
        <Modal
            show={show}
            onHide={closeModal}
        >
            <Modal.Header closeButton />
        </Modal>
    )
}

AboutGroup.Modal = Modal

export default AboutGroup