[PlayerPanel] dangerousHTML error

This commit is contained in:
고동영
2024-06-25 17:54:20 +09:00
parent cbf5c60462
commit 62ef6e0495
2 changed files with 16 additions and 30 deletions

View File

@@ -107,7 +107,7 @@ export default memo(function PlayerItemCard({
}, [onFocus]);
const progressStyle = useMemo(() => ({ width: `${percent}%` }), [percent]);
const ariaLabel = "Selected, " + patnerName + " " + productName;
const ariaLabel = "Selected, " + patnerName + " " + productName();
return (
<SpottableComponent
@@ -146,10 +146,7 @@ export default memo(function PlayerItemCard({
<h3 className={css.brandName}>{patnerName}</h3>
</div>
<h3
dangerouslySetInnerHTML={productName && productName()}
className={css.title}
/>
<h3 dangerouslySetInnerHTML={productName()} className={css.title} />
{liveInfo && (
<div
className={classNames(

View File

@@ -1,25 +1,16 @@
import React, {
useCallback,
useEffect,
useState,
} from 'react';
import 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 TVirtualGridList
from '../../../../components/TVirtualGridList/TVirtualGridList';
import {
LOG_MENU,
panel_names,
} from '../../../../utils/Config';
import { $L } from '../../../../utils/helperMethods';
import PlayerItemCard, { TYPES } from '../../PlayerItemCard/PlayerItemCard';
import ListEmptyContents
from '../TabContents/ListEmptyContents/ListEmptyContents';
import css from './LiveChannelContents.module.less';
import { updatePanel } from "../../../../actions/panelActions";
import TVirtualGridList from "../../../../components/TVirtualGridList/TVirtualGridList";
import { LOG_MENU, panel_names } from "../../../../utils/Config";
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({
liveInfos,
@@ -70,7 +61,9 @@ export default function LiveChannelContents({
};
const showNameDangerouslySetInnerHTML = () => {
return { __html: showNm };
return showNm
? { __html: showNm }
: { __html: $L("No Livestream scheduled yet") };
};
return (
@@ -81,11 +74,7 @@ export default function LiveChannelContents({
logo={patncLogoPath}
imageSource={thumbnailUrl ? thumbnailUrl : dfltThumbnailImgPath}
videoVerticalVisible={videoVerticalVisible}
productName={
showNm
? showNameDangerouslySetInnerHTML
: $L("No Livestream scheduled yet")
}
productName={showNameDangerouslySetInnerHTML}
patnerName={patncNm}
onClick={handleItemClick}
onFocus={handleFocus()}