File "VulnerabilitiesFooter.js"
Full path: /home/satkhirabarta/public_html/wp-content/plugins/really-simple-ssl/settings/src/Dashboard/Vulnerabilities/VulnerabilitiesFooter.js
File
size: 1 B
MIME-type: text/html
Charset: utf-8
Download Open Edit Advanced Editor &nnbsp; Back
import {useEffect, useState} from '@wordpress/element';
import {__} from '@wordpress/i18n';
import useRiskData from "../../Settings/RiskConfiguration/RiskData";
import useFields from "../../Settings/FieldsData";
import {getRelativeTime} from '../../utils/formatting';
const VulnerabilitiesFooter = (props) => {
const {lastChecked} = useRiskData();
const {fields, getFieldValue} = useFields();
const [vulEnabled, setVulEnabled] = useState(false);
useEffect(() => {
if (getFieldValue('enable_vulnerability_scanner')==1) {
setVulEnabled(true);
}
}, [fields]);
const styleFooter = {
textAlign: 'right',
position: 'relative',
right: '0',
}
return (
<>
<a href="#settings/vulnerabilities" className={'button button-default'}>{__('Settings', 'really-simple-ssl')}</a>
{vulEnabled? <p className={'rsssl-small-text'}>{getRelativeTime(lastChecked)}</p>: null}
</>
)
}
export default VulnerabilitiesFooter;