import { describe } from 'node:test'; import { useState, useEffect } from 'react'; import { dataListFlow } from '../data/data'; const PopupListFlow = ({ hidePopup, onSelectFlow }) => { const [showPopup, setShowPopup] = useState(true); const handleOverlayClick = () => { setShowPopup(false); }; const handleFlowClick = (flow) => { onSelectFlow(flow); // Gọi callback với flow đã chọn setShowPopup(false); // Ẩn popup }; useEffect(() => { if (!showPopup) { hidePopup(); // Đảm bảo khi popup bị ẩn, nó được xử lý ở component cha } }, [showPopup, hidePopup]); return ( <>

These starting points are popular with other Mailchimp customers.

Some starting points are coming soon or require additional setup.

{dataListFlow.map((option) => (
handleFlowClick(option.key)} >
{option.name}

{option.name}

))}
); }; export default PopupListFlow;