mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
videoThumbnail prop removed
This commit is contained in:
parent
a4350d4b2c
commit
5b40ef9d94
4 changed files with 4 additions and 7 deletions
|
|
@ -15,7 +15,7 @@ const ICON_FOR_TYPE = Object.assign(Object.create(null), {
|
|||
'other': 'ic_movies'
|
||||
});
|
||||
|
||||
const Notification = ({ className, id, type, name, poster, thumbnail, season, episode, released, videoThumbnail, onClick }) => {
|
||||
const Notification = ({ className, id, type, name, poster, thumbnail, season, episode, released, onClick }) => {
|
||||
const daysAgo = React.useMemo(() => {
|
||||
return Math.floor(Math.abs((Date.now() - released) / (24 * 60 * 60 * 1000)));
|
||||
}, [released]);
|
||||
|
|
@ -54,7 +54,7 @@ const Notification = ({ className, id, type, name, poster, thumbnail, season, ep
|
|||
}
|
||||
</div>
|
||||
{
|
||||
videoThumbnail ?
|
||||
thumbnail !== null ?
|
||||
<div className={styles['poster-container']}>
|
||||
<div className={styles['poster-image-layer']}>
|
||||
<Image
|
||||
|
|
@ -90,7 +90,6 @@ Notification.propTypes = {
|
|||
season: PropTypes.number,
|
||||
episode: PropTypes.number,
|
||||
released: PropTypes.instanceOf(Date),
|
||||
videoThumbnail: PropTypes.bool,
|
||||
onClick: PropTypes.func
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ const NotificationsList = ({ className, metaItems }) => {
|
|||
{...notification}
|
||||
key={`${index}${req.base}${content.type}${notification.id}`}
|
||||
className={styles['notification']}
|
||||
videoThumbnail={true}
|
||||
thumbnail={notification.videos[0].thumbnail}
|
||||
season={notification.videos[0].season}
|
||||
episode={notification.videos[0].episode}
|
||||
|
|
@ -41,8 +40,8 @@ const NotificationsList = ({ className, metaItems }) => {
|
|||
{...notification}
|
||||
key={`${index}${req.base}${content.type}${notification.id}`}
|
||||
className={styles['notification']}
|
||||
videoThumbnail={false}
|
||||
name={notification.videos.length + ' new videos for ' + notification.name}
|
||||
thumbnail={null}
|
||||
released={notification.videos[notification.videos.length - 1].released}
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ storiesOf('Notification', module).add('MultipleVideos', () => (
|
|||
type={'series'}
|
||||
name={'Demo name'}
|
||||
poster={'/images/intro_background.jpg'}
|
||||
thumbnail={null}
|
||||
released={new Date()}
|
||||
videoThumbnail={false}
|
||||
onClick={action('Demo item clicked')}
|
||||
/>
|
||||
));
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ storiesOf('Notification', module).add('SingleVideo', () => (
|
|||
season={1}
|
||||
episode={1}
|
||||
released={new Date()}
|
||||
videoThumbnail={true}
|
||||
onClick={action('Demo item clicked')}
|
||||
/>
|
||||
));
|
||||
|
|
|
|||
Loading…
Reference in a new issue