Skip to content

Commit

Permalink
add interface IProps
Browse files Browse the repository at this point in the history
  • Loading branch information
dzonidoo committed Dec 8, 2023
1 parent 98a3520 commit abf9656
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions assets/wire/components/fields/DurationLabel.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
import React from 'react';
import PropTypes from 'prop-types';
import {gettext} from 'utils';
import {IArticle} from 'interfaces';

interface IProps {
item: IArticle,
filterGroupLabels: {
[field: string]: string;
},
}

export function DurationLabel (props: IProps) {
const {item, filterGroupLabels} = props;

export function DurationLabel ({item, filterGroupLabels}: any) {
if (item.extra?.duration == null) {
return null;
}
Expand Down Expand Up @@ -35,8 +45,3 @@ export function DurationLabel ({item, filterGroupLabels}: any) {
<span>{text}</span>
);
}

DurationLabel.propTypes = {
item: PropTypes.object,
filterGroupLabels: PropTypes.object,
};

0 comments on commit abf9656

Please sign in to comment.