Skip to content

Commit

Permalink
changes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
dzonidoo committed Dec 7, 2023
1 parent 94739a6 commit e6c0c7a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions assets/wire/components/fields/ExpiryDateLabel.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import React from 'react';
import PropTypes from 'prop-types';
import {gettext} from 'utils';
import {get} from 'lodash';
import {gettext, formatDate} from 'utils';

export function ExpiryDateLabel ({item, filterGroupLabels}: any) {
if (item.expiry == null) {
return null;
}

const label = get(filterGroupLabels, 'expiry', gettext('Expiry Date'));
const value = item.expiry;
const label = filterGroupLabels?.expiry ?? gettext('Expiry Date');
const value = formatDate(item.expiry);
const text = label + ': ' + value;

return (
Expand Down

0 comments on commit e6c0c7a

Please sign in to comment.