mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
VideosList search: search by title and released
This commit is contained in:
parent
95ceb44255
commit
809db2ed52
1 changed files with 5 additions and 1 deletions
|
|
@ -73,7 +73,11 @@ const VideosList = ({ className, metaResource }) => {
|
||||||
<div className={styles['videos-scroll-container']}>
|
<div className={styles['videos-scroll-container']}>
|
||||||
{videosForSeason
|
{videosForSeason
|
||||||
.filter((video) => {
|
.filter((video) => {
|
||||||
return search.length === 0 || (typeof video.title === 'string' && video.title.toLowerCase().includes(search.toLowerCase()));
|
return search.length === 0 ||
|
||||||
|
(
|
||||||
|
(typeof video.title === 'string' && video.title.toLowerCase().includes(search.toLowerCase())) ||
|
||||||
|
(video.released.toLocaleString(undefined, { year: '2-digit', month: 'short', day: 'numeric' }).toLowerCase().includes(search.toLowerCase()))
|
||||||
|
);
|
||||||
})
|
})
|
||||||
.map((video, index) => (
|
.map((video, index) => (
|
||||||
<Video
|
<Video
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue