[PlayerPanel] dangerousHTML error
This commit is contained in:
@@ -107,7 +107,7 @@ export default memo(function PlayerItemCard({
|
|||||||
}, [onFocus]);
|
}, [onFocus]);
|
||||||
|
|
||||||
const progressStyle = useMemo(() => ({ width: `${percent}%` }), [percent]);
|
const progressStyle = useMemo(() => ({ width: `${percent}%` }), [percent]);
|
||||||
const ariaLabel = "Selected, " + patnerName + " " + productName;
|
const ariaLabel = "Selected, " + patnerName + " " + productName();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SpottableComponent
|
<SpottableComponent
|
||||||
@@ -146,10 +146,7 @@ export default memo(function PlayerItemCard({
|
|||||||
<h3 className={css.brandName}>{patnerName}</h3>
|
<h3 className={css.brandName}>{patnerName}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3
|
<h3 dangerouslySetInnerHTML={productName()} className={css.title} />
|
||||||
dangerouslySetInnerHTML={productName && productName()}
|
|
||||||
className={css.title}
|
|
||||||
/>
|
|
||||||
{liveInfo && (
|
{liveInfo && (
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
|
|||||||
@@ -1,25 +1,16 @@
|
|||||||
import React, {
|
import React, { useCallback, useEffect, useState } from "react";
|
||||||
useCallback,
|
|
||||||
useEffect,
|
|
||||||
useState,
|
|
||||||
} from 'react';
|
|
||||||
|
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch } from "react-redux";
|
||||||
|
|
||||||
import Spotlight from '@enact/spotlight';
|
import Spotlight from "@enact/spotlight";
|
||||||
|
|
||||||
import { updatePanel } from '../../../../actions/panelActions';
|
import { updatePanel } from "../../../../actions/panelActions";
|
||||||
import TVirtualGridList
|
import TVirtualGridList from "../../../../components/TVirtualGridList/TVirtualGridList";
|
||||||
from '../../../../components/TVirtualGridList/TVirtualGridList';
|
import { LOG_MENU, panel_names } from "../../../../utils/Config";
|
||||||
import {
|
import { $L } from "../../../../utils/helperMethods";
|
||||||
LOG_MENU,
|
import PlayerItemCard, { TYPES } from "../../PlayerItemCard/PlayerItemCard";
|
||||||
panel_names,
|
import ListEmptyContents from "../TabContents/ListEmptyContents/ListEmptyContents";
|
||||||
} from '../../../../utils/Config';
|
import css from "./LiveChannelContents.module.less";
|
||||||
import { $L } from '../../../../utils/helperMethods';
|
|
||||||
import PlayerItemCard, { TYPES } from '../../PlayerItemCard/PlayerItemCard';
|
|
||||||
import ListEmptyContents
|
|
||||||
from '../TabContents/ListEmptyContents/ListEmptyContents';
|
|
||||||
import css from './LiveChannelContents.module.less';
|
|
||||||
|
|
||||||
export default function LiveChannelContents({
|
export default function LiveChannelContents({
|
||||||
liveInfos,
|
liveInfos,
|
||||||
@@ -70,7 +61,9 @@ export default function LiveChannelContents({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const showNameDangerouslySetInnerHTML = () => {
|
const showNameDangerouslySetInnerHTML = () => {
|
||||||
return { __html: showNm };
|
return showNm
|
||||||
|
? { __html: showNm }
|
||||||
|
: { __html: $L("No Livestream scheduled yet") };
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -81,11 +74,7 @@ export default function LiveChannelContents({
|
|||||||
logo={patncLogoPath}
|
logo={patncLogoPath}
|
||||||
imageSource={thumbnailUrl ? thumbnailUrl : dfltThumbnailImgPath}
|
imageSource={thumbnailUrl ? thumbnailUrl : dfltThumbnailImgPath}
|
||||||
videoVerticalVisible={videoVerticalVisible}
|
videoVerticalVisible={videoVerticalVisible}
|
||||||
productName={
|
productName={showNameDangerouslySetInnerHTML}
|
||||||
showNm
|
|
||||||
? showNameDangerouslySetInnerHTML
|
|
||||||
: $L("No Livestream scheduled yet")
|
|
||||||
}
|
|
||||||
patnerName={patncNm}
|
patnerName={patncNm}
|
||||||
onClick={handleItemClick}
|
onClick={handleItemClick}
|
||||||
onFocus={handleFocus()}
|
onFocus={handleFocus()}
|
||||||
|
|||||||
Reference in New Issue
Block a user