const HistoryModal = ({ isVisible, onClose, countries, dangerLevel, history }) => { if (!isVisible) return null; const handleClose = (e) => { if(e.target.id === 'wrapper') onClose(); } let historyList; if (history && history.length > 0) { historyList = history.map((event, index) => { return (
  • {event}
  • ) }) } else { historyList =
  • Currently no diplomatic tensions in this country.
  • ; } return (

    {countries}

    {dangerLevel}

    History

      {historyList}
    ) } export default HistoryModal;