Lidarr/frontend/src/Album/SeasonEpisodeNumber.js

33 lines
576 B
JavaScript
Raw Normal View History

2017-09-04 02:20:56 +00:00
import PropTypes from 'prop-types';
import React from 'react';
import EpisodeNumber from './EpisodeNumber';
2017-09-04 02:20:56 +00:00
function SeasonEpisodeNumber(props) {
const {
airDate,
artistType,
...otherProps
2017-09-04 02:20:56 +00:00
} = props;
2017-10-07 22:38:31 +00:00
if (artistType === 'daily' && airDate) {
2017-09-04 02:20:56 +00:00
return (
<span>{airDate}</span>
);
}
return (
<EpisodeNumber
seriesType={artistType}
showSeasonNumber={true}
{...otherProps}
/>
2017-09-04 02:20:56 +00:00
);
}
SeasonEpisodeNumber.propTypes = {
airDate: PropTypes.string,
2017-10-07 22:38:31 +00:00
artistType: PropTypes.string
2017-09-04 02:20:56 +00:00
};
export default SeasonEpisodeNumber;