diff --git a/assets/interfaces/content.ts b/assets/interfaces/content.ts index 375568ae7..21feba4b8 100644 --- a/assets/interfaces/content.ts +++ b/assets/interfaces/content.ts @@ -27,6 +27,7 @@ export interface IArticle extends IResourceItem { type?: 'transcript'; [key: string]: any; }; + expiry?: string; es_highlight?: {[field: string]: Array} deleted?: boolean; // Used only in the front-end, populated by wire/reducer } diff --git a/assets/wire/components/fields/ExpiryDateLabel.tsx b/assets/wire/components/fields/ExpiryDateLabel.tsx index dac139217..7cf92caab 100644 --- a/assets/wire/components/fields/ExpiryDateLabel.tsx +++ b/assets/wire/components/fields/ExpiryDateLabel.tsx @@ -1,8 +1,17 @@ import React from 'react'; -import PropTypes from 'prop-types'; import {gettext, formatDate} from 'utils'; +import {IArticle} from 'interfaces'; + +interface IProps { + item: IArticle, + filterGroupLabels: { + [field: string]: string; + }, +} + +export function ExpiryDateLabel (props: IProps) { + const {item, filterGroupLabels} = props; -export function ExpiryDateLabel ({item, filterGroupLabels}: any) { if (item.expiry == null) { return null; } @@ -15,8 +24,3 @@ export function ExpiryDateLabel ({item, filterGroupLabels}: any) { {text} ); } - -ExpiryDateLabel.propTypes = { - item: PropTypes.object, - filterGroupLabels: PropTypes.object, -};