const HistoryModal = ({ isVisible, onClose, countries, dangerLevel, visaInfo }) => { if (!isVisible) return null; const handleClose = (e) => { if(e.target.id === 'wrapper') onClose(); } let historyList; if (visaInfo && visaInfo.length > 0) { historyList = visaInfo.map((event, index) => { return (
  • {event}
  • ) }) } else { historyList =
  • No additional information for {countries}.
  • ; } return (

    {countries}

    {dangerLevel}

    Additional Information

      {historyList}
    ) } export default HistoryModal;