mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 11:42: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'
|
'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(() => {
|
const daysAgo = React.useMemo(() => {
|
||||||
return Math.floor(Math.abs((Date.now() - released) / (24 * 60 * 60 * 1000)));
|
return Math.floor(Math.abs((Date.now() - released) / (24 * 60 * 60 * 1000)));
|
||||||
}, [released]);
|
}, [released]);
|
||||||
|
|
@ -54,7 +54,7 @@ const Notification = ({ className, id, type, name, poster, thumbnail, season, ep
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
videoThumbnail ?
|
thumbnail !== null ?
|
||||||
<div className={styles['poster-container']}>
|
<div className={styles['poster-container']}>
|
||||||
<div className={styles['poster-image-layer']}>
|
<div className={styles['poster-image-layer']}>
|
||||||
<Image
|
<Image
|
||||||
|
|
@ -90,7 +90,6 @@ Notification.propTypes = {
|
||||||
season: PropTypes.number,
|
season: PropTypes.number,
|
||||||
episode: PropTypes.number,
|
episode: PropTypes.number,
|
||||||
released: PropTypes.instanceOf(Date),
|
released: PropTypes.instanceOf(Date),
|
||||||
videoThumbnail: PropTypes.bool,
|
|
||||||
onClick: PropTypes.func
|
onClick: PropTypes.func
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ const NotificationsList = ({ className, metaItems }) => {
|
||||||
{...notification}
|
{...notification}
|
||||||
key={`${index}${req.base}${content.type}${notification.id}`}
|
key={`${index}${req.base}${content.type}${notification.id}`}
|
||||||
className={styles['notification']}
|
className={styles['notification']}
|
||||||
videoThumbnail={true}
|
|
||||||
thumbnail={notification.videos[0].thumbnail}
|
thumbnail={notification.videos[0].thumbnail}
|
||||||
season={notification.videos[0].season}
|
season={notification.videos[0].season}
|
||||||
episode={notification.videos[0].episode}
|
episode={notification.videos[0].episode}
|
||||||
|
|
@ -41,8 +40,8 @@ const NotificationsList = ({ className, metaItems }) => {
|
||||||
{...notification}
|
{...notification}
|
||||||
key={`${index}${req.base}${content.type}${notification.id}`}
|
key={`${index}${req.base}${content.type}${notification.id}`}
|
||||||
className={styles['notification']}
|
className={styles['notification']}
|
||||||
videoThumbnail={false}
|
|
||||||
name={notification.videos.length + ' new videos for ' + notification.name}
|
name={notification.videos.length + ' new videos for ' + notification.name}
|
||||||
|
thumbnail={null}
|
||||||
released={notification.videos[notification.videos.length - 1].released}
|
released={notification.videos[notification.videos.length - 1].released}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,8 @@ storiesOf('Notification', module).add('MultipleVideos', () => (
|
||||||
type={'series'}
|
type={'series'}
|
||||||
name={'Demo name'}
|
name={'Demo name'}
|
||||||
poster={'/images/intro_background.jpg'}
|
poster={'/images/intro_background.jpg'}
|
||||||
|
thumbnail={null}
|
||||||
released={new Date()}
|
released={new Date()}
|
||||||
videoThumbnail={false}
|
|
||||||
onClick={action('Demo item clicked')}
|
onClick={action('Demo item clicked')}
|
||||||
/>
|
/>
|
||||||
));
|
));
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ storiesOf('Notification', module).add('SingleVideo', () => (
|
||||||
season={1}
|
season={1}
|
||||||
episode={1}
|
episode={1}
|
||||||
released={new Date()}
|
released={new Date()}
|
||||||
videoThumbnail={true}
|
|
||||||
onClick={action('Demo item clicked')}
|
onClick={action('Demo item clicked')}
|
||||||
/>
|
/>
|
||||||
));
|
));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue