2017-09-04 02:20:56 +00:00
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import React from 'react';
|
2017-12-14 03:38:27 +00:00
|
|
|
import EpisodeNumber from './EpisodeNumber';
|
2017-09-04 02:20:56 +00:00
|
|
|
|
|
|
|
function SeasonEpisodeNumber(props) {
|
|
|
|
const {
|
|
|
|
airDate,
|
2017-12-14 03:38:27 +00:00
|
|
|
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 (
|
2017-12-14 03:38:27 +00:00
|
|
|
<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;
|