From 35fb56c3bf8c65506363e229fb69c76a603aee62 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Fri, 10 Jan 2025 09:32:09 -0500 Subject: Travel advisory, added visa page --- app/visas/HistoryModal.js | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 app/visas/HistoryModal.js (limited to 'app/visas/HistoryModal.js') diff --git a/app/visas/HistoryModal.js b/app/visas/HistoryModal.js new file mode 100644 index 0000000..6d4df91 --- /dev/null +++ b/app/visas/HistoryModal.js @@ -0,0 +1,40 @@ +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; -- cgit v1.2.3