diff --git a/client/src/components/ui/EncryptionTopline.js b/client/src/components/ui/EncryptionTopline.js
index 21731219..7c84a847 100644
--- a/client/src/components/ui/EncryptionTopline.js
+++ b/client/src/components/ui/EncryptionTopline.js
@@ -8,27 +8,29 @@ import Topline from './Topline';
import { EMPTY_DATE } from '../../helpers/constants';
const EncryptionTopline = (props) => {
- if (props.notAfter !== EMPTY_DATE) {
- const isAboutExpire = isAfter(addDays(Date.now(), 30), props.notAfter);
- const isExpired = isAfter(Date.now(), props.notAfter);
+ if (props.notAfter === EMPTY_DATE) {
+ return false;
+ }
- if (isExpired) {
- return (
-
- link]}>
- topline_expired_certificate
-
-
- );
- } else if (isAboutExpire) {
- return (
-
- link]}>
- topline_expiring_certificate
-
-
- );
- }
+ const isAboutExpire = isAfter(addDays(Date.now(), 30), props.notAfter);
+ const isExpired = isAfter(Date.now(), props.notAfter);
+
+ if (isExpired) {
+ return (
+
+ link]}>
+ topline_expired_certificate
+
+
+ );
+ } else if (isAboutExpire) {
+ return (
+
+ link]}>
+ topline_expiring_certificate
+
+
+ );
}
return false;