Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../public_h.../clone/wp-conte.../plugins/ninja-fo.../src/componen...
File: displayModal.js
import { Button, Modal } from '@wordpress/components';
[0] Fix | Delete
import PropTypes from 'prop-types';
[1] Fix | Delete
[2] Fix | Delete
export const DisplayModal = ( props ) => {
[3] Fix | Delete
return (
[4] Fix | Delete
<>
[5] Fix | Delete
<Modal
[6] Fix | Delete
title={ props.title }
[7] Fix | Delete
onRequestClose={ () => props.cancel( false ) }
[8] Fix | Delete
>
[9] Fix | Delete
<Button
[10] Fix | Delete
isPrimary
[11] Fix | Delete
onClick={ props.action }
[12] Fix | Delete
style={ { marginRight: '1rem' } }
[13] Fix | Delete
>
[14] Fix | Delete
{ props.actionText }
[15] Fix | Delete
</Button>
[16] Fix | Delete
{ props.cancel && (
[17] Fix | Delete
<Button isSecondary onClick={ () => props.cancel( false ) }>
[18] Fix | Delete
{ props.cancelText }
[19] Fix | Delete
</Button>
[20] Fix | Delete
) }
[21] Fix | Delete
</Modal>
[22] Fix | Delete
</>
[23] Fix | Delete
);
[24] Fix | Delete
};
[25] Fix | Delete
[26] Fix | Delete
DisplayModal.propTypes = {
[27] Fix | Delete
title: PropTypes.string,
[28] Fix | Delete
actionText: PropTypes.string,
[29] Fix | Delete
cancelText: PropTypes.string,
[30] Fix | Delete
action: PropTypes.func.isRequired,
[31] Fix | Delete
cancel: PropTypes.func.isRequired
[32] Fix | Delete
}
[33] Fix | Delete
[34] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function