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 ( <>
Some starting points are coming soon or require additional setup.
{option.name}