Skip to content

Commit

Permalink
Capitalize the license type in monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisronline committed Jul 11, 2018
1 parent c6828d6 commit 38ad3a5
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
export class LicenseStatus extends React.PureComponent {
render() {
const { isExpired, status, type, expiryDate } = this.props;
const capitalizedType = type[0].toUpperCase() + type.slice(1);
let icon;
let title;
let message;
Expand All @@ -28,7 +29,7 @@ export class LicenseStatus extends React.PureComponent {
Your license expired on <strong>{expiryDate}</strong>
</Fragment>
);
title = `Your ${type} license has expired`;
title = `Your ${capitalizedType} license has expired`;
} else {
icon = <EuiIcon color="success" type="checkInCircleFilled" />;
message = expiryDate ? (
Expand All @@ -38,7 +39,7 @@ export class LicenseStatus extends React.PureComponent {
) : (
<Fragment>Your license will never expire.</Fragment>
);
title = `Your ${type} license is ${status.toLowerCase()}`;
title = `Your ${capitalizedType} license is ${status.toLowerCase()}`;
}
return (
<div>
Expand Down

0 comments on commit 38ad3a5

Please sign in to comment.