Skip to content

Commit

Permalink
Merge pull request #54 from OpenLMIS/OLMIS-8027
Browse files Browse the repository at this point in the history
OLMIS-8027: Changed modal prop to prevent inconsistency around the app
  • Loading branch information
DominikNoga authored Oct 24, 2024
2 parents 6538d46 + 4e8e141 commit 3d51280
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/react-components/DetailsBlock.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions src/react-components/modals/Modal.jsx
Original file line number Diff line number Diff line change
@@ -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' : '';

Expand All @@ -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>
)
Expand Down

0 comments on commit 3d51280

Please sign in to comment.