diff --git a/src/react-components/DetailsBlock.jsx b/src/react-components/DetailsBlock.jsx index e1c4ffa9..1b24128b 100644 --- a/src/react-components/DetailsBlock.jsx +++ b/src/react-components/DetailsBlock.jsx @@ -21,8 +21,8 @@ const DetailsBlock = ({ data, className }) => { <div className={`details-block-container ${className ? className : ''}`}> <table> <tbody> - {data.map((elements) => ( - <tr key={elements}> + {data.map((elements, index) => ( + <tr key={index}> {elements.map((element) => ( <td key={element.topic} className='element'> {element.topic}: <b>{element.value}</b> diff --git a/src/react-components/modals/Modal.jsx b/src/react-components/modals/Modal.jsx index c695f494..c5ce545e 100644 --- a/src/react-components/modals/Modal.jsx +++ b/src/react-components/modals/Modal.jsx @@ -1,6 +1,6 @@ import React, { useEffect } from 'react'; -const Modal = ({ isOpen, body, alertModal = false, sourceOfFundStyle = '' }) => { +const Modal = ({ isOpen, children, alertModal = false, sourceOfFundStyle = '' }) => { const showHideClassName = isOpen ? 'react-modal display-block' : 'react-modal display-none'; const alertModalClassName = alertModal ? 'alert-modal is-error' : ''; @@ -23,7 +23,7 @@ const Modal = ({ isOpen, body, alertModal = false, sourceOfFundStyle = '' }) => ( <div className={`${showHideClassName} ${alertModalClassName}`}> <section className={`modal-main ${sourceOfFundStyle ? 'source-of-fund-modal' : ''}`}> - {body} + {children} </section> </div> )