Fixed EncryptionTopline check
This commit is contained in:
parent
5ac775aa4a
commit
37a1a98c49
@ -8,27 +8,29 @@ import Topline from './Topline';
|
|||||||
import { EMPTY_DATE } from '../../helpers/constants';
|
import { EMPTY_DATE } from '../../helpers/constants';
|
||||||
|
|
||||||
const EncryptionTopline = (props) => {
|
const EncryptionTopline = (props) => {
|
||||||
if (props.notAfter !== EMPTY_DATE) {
|
if (props.notAfter === EMPTY_DATE) {
|
||||||
const isAboutExpire = isAfter(addDays(Date.now(), 30), props.notAfter);
|
return false;
|
||||||
const isExpired = isAfter(Date.now(), props.notAfter);
|
}
|
||||||
|
|
||||||
if (isExpired) {
|
const isAboutExpire = isAfter(addDays(Date.now(), 30), props.notAfter);
|
||||||
return (
|
const isExpired = isAfter(Date.now(), props.notAfter);
|
||||||
<Topline type="danger">
|
|
||||||
<Trans components={[<a href="#settings" key="0">link</a>]}>
|
if (isExpired) {
|
||||||
topline_expired_certificate
|
return (
|
||||||
</Trans>
|
<Topline type="danger">
|
||||||
</Topline>
|
<Trans components={[<a href="#settings" key="0">link</a>]}>
|
||||||
);
|
topline_expired_certificate
|
||||||
} else if (isAboutExpire) {
|
</Trans>
|
||||||
return (
|
</Topline>
|
||||||
<Topline type="warning">
|
);
|
||||||
<Trans components={[<a href="#settings" key="0">link</a>]}>
|
} else if (isAboutExpire) {
|
||||||
topline_expiring_certificate
|
return (
|
||||||
</Trans>
|
<Topline type="warning">
|
||||||
</Topline>
|
<Trans components={[<a href="#settings" key="0">link</a>]}>
|
||||||
);
|
topline_expiring_certificate
|
||||||
}
|
</Trans>
|
||||||
|
</Topline>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user