mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 03:22:11 +00:00
linksGroups rewritten with Map
This commit is contained in:
parent
99fdd38e16
commit
a4ade4663c
1 changed files with 7 additions and 7 deletions
|
|
@ -103,7 +103,7 @@ const MetaPreview = ({ className, compact, name, logo, background, runtime, rele
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
(typeof releaseInfo === 'string' && releaseInfo.length > 0) || (released instanceof Date && !isNaN(released.getTime())) || (typeof runtime === 'string' && runtime.length > 0) || typeof linksGroups[CONSTANTS.IMDB_LINK_CATEGORY] === 'object' ?
|
(typeof releaseInfo === 'string' && releaseInfo.length > 0) || (released instanceof Date && !isNaN(released.getTime())) || (typeof runtime === 'string' && runtime.length > 0) || typeof linksGroups.get(CONSTANTS.IMDB_LINK_CATEGORY) === 'object' ?
|
||||||
<div className={styles['runtime-release-info-container']}>
|
<div className={styles['runtime-release-info-container']}>
|
||||||
{
|
{
|
||||||
typeof runtime === 'string' && runtime.length > 0 ?
|
typeof runtime === 'string' && runtime.length > 0 ?
|
||||||
|
|
@ -121,16 +121,16 @@ const MetaPreview = ({ className, compact, name, logo, background, runtime, rele
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typeof linksGroups[CONSTANTS.IMDB_LINK_CATEGORY] === 'object' ?
|
typeof linksGroups.get(CONSTANTS.IMDB_LINK_CATEGORY) === 'object' ?
|
||||||
<Button
|
<Button
|
||||||
className={styles['imdb-button-container']}
|
className={styles['imdb-button-container']}
|
||||||
title={linksGroups[CONSTANTS.IMDB_LINK_CATEGORY].label}
|
title={linksGroups.get(CONSTANTS.IMDB_LINK_CATEGORY).label}
|
||||||
href={linksGroups[CONSTANTS.IMDB_LINK_CATEGORY].href}
|
href={linksGroups.get(CONSTANTS.IMDB_LINK_CATEGORY).href}
|
||||||
target={'_blank'}
|
target={'_blank'}
|
||||||
{...(compact ? { tabIndex: -1 } : null)}
|
{...(compact ? { tabIndex: -1 } : null)}
|
||||||
>
|
>
|
||||||
<Icon className={styles['icon']} icon={'ic_imdbnoframe'} />
|
<Icon className={styles['icon']} icon={'ic_imdbnoframe'} />
|
||||||
<div className={styles['label']}>{linksGroups[CONSTANTS.IMDB_LINK_CATEGORY].label}</div>
|
<div className={styles['label']}>{linksGroups.get(CONSTANTS.IMDB_LINK_CATEGORY).label}</div>
|
||||||
</Button>
|
</Button>
|
||||||
:
|
:
|
||||||
null
|
null
|
||||||
|
|
@ -195,7 +195,7 @@ const MetaPreview = ({ className, compact, name, logo, background, runtime, rele
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
typeof linksGroups[CONSTANTS.SHARE_LINK_CATEGORY] === 'object' ?
|
typeof linksGroups.get(CONSTANTS.SHARE_LINK_CATEGORY) === 'object' ?
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<ActionButton
|
<ActionButton
|
||||||
className={styles['action-button']}
|
className={styles['action-button']}
|
||||||
|
|
@ -209,7 +209,7 @@ const MetaPreview = ({ className, compact, name, logo, background, runtime, rele
|
||||||
<ModalDialog title={'Share'} onCloseRequest={closeShareModal}>
|
<ModalDialog title={'Share'} onCloseRequest={closeShareModal}>
|
||||||
<SharePrompt
|
<SharePrompt
|
||||||
className={styles['share-prompt']}
|
className={styles['share-prompt']}
|
||||||
url={linksGroups[CONSTANTS.SHARE_LINK_CATEGORY].href}
|
url={linksGroups.get(CONSTANTS.SHARE_LINK_CATEGORY).href}
|
||||||
/>
|
/>
|
||||||
</ModalDialog>
|
</ModalDialog>
|
||||||
:
|
:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue