mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-22 00:12:08 +00:00
Merge branch 'development' of github.com:Stremio/stremio-web into streaming-server-middleware
This commit is contained in:
commit
2bbf3934c9
1 changed files with 32 additions and 29 deletions
|
|
@ -27,7 +27,8 @@ const ALLOWED_LINK_REDIRECTS = [
|
|||
const MetaPreview = ({ className, compact, name, logo, background, runtime, releaseInfo, released, description, links, trailer, inLibrary, toggleInLibrary }) => {
|
||||
const [shareModalOpen, openShareModal, closeShareModal] = useBinaryState(false);
|
||||
const linksGroups = React.useMemo(() => {
|
||||
return links
|
||||
return Array.isArray(links) ?
|
||||
links
|
||||
.filter((link) => link && typeof link.category === 'string' && typeof link.url === 'string')
|
||||
.reduce((linksGroups, { category, name, url }) => {
|
||||
if (category === CONSTANTS.IMDB_LINK_CATEGORY) {
|
||||
|
|
@ -64,7 +65,9 @@ const MetaPreview = ({ className, compact, name, logo, background, runtime, rele
|
|||
}
|
||||
|
||||
return linksGroups;
|
||||
}, new Map());
|
||||
}, new Map())
|
||||
:
|
||||
new Map();
|
||||
}, [links]);
|
||||
const trailerHref = React.useMemo(() => {
|
||||
if (typeof trailer !== 'object' || trailer === null) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue