[CategoryPanel] SHOPTIME-2985

- 독일 / Category / New, Most Popular 번역 안됨
This commit is contained in:
jiwon93.son
2024-07-18 17:37:45 +09:00
parent 9e1edbdb91
commit 28b65661fe
5 changed files with 58 additions and 41 deletions

View File

@@ -92,6 +92,7 @@
"Set a Reminder": "Erinnerung erstellen",
"With Host": "mit Moderator",
"NEW": "NEU",
"New": "Neu",
"Most Popular": "Am beliebtesten",
"RECOMMENDED SHOWS": "EMPFOHLENE SHOWS",
"SERIES": "SERIEN",

View File

@@ -92,6 +92,7 @@
"Set a Reminder": "Set a Reminder",
"With Host": "With Host",
"NEW": "NEW",
"New": "New",
"Most Popular": "Most Popular",
"RECOMMENDED SHOWS": "RECOMMENDED SHOWS",
"SERIES": "SERIES",

View File

@@ -92,6 +92,7 @@
"Set a Reminder": "Set a Reminder",
"With Host": "With Host",
"NEW": "NEW",
"New": "New",
"Most Popular": "Most Popular",
"RECOMMENDED SHOWS": "RECOMMENDED SHOWS",
"SERIES": "SERIES",

View File

@@ -92,6 +92,7 @@
"Set a Reminder": "Установить напоминание",
"With Host": "Ведущий",
"NEW": "НОВИНКИ",
"New": "НОВИНКИ",
"Most Popular": "Самое Популярное",
"RECOMMENDED SHOWS": "РЕКОМЕНДУЕМЫЕ ШОУ",
"SERIES": "СЕРИИ",

View File

@@ -4,46 +4,54 @@ import React, {
useMemo,
useRef,
useState,
} from "react";
} from 'react';
import classNames from "classnames";
import { useDispatch, useSelector } from "react-redux";
import classNames from 'classnames';
import {
useDispatch,
useSelector,
} from 'react-redux';
import { Job } from "@enact/core/util";
import Spotlight from "@enact/spotlight";
import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator";
import { setContainerLastFocusedElement } from "@enact/spotlight/src/container";
import { Job } from '@enact/core/util';
import Spotlight from '@enact/spotlight';
import SpotlightContainerDecorator
from '@enact/spotlight/SpotlightContainerDecorator';
import { setContainerLastFocusedElement } from '@enact/spotlight/src/container';
import {
sendLogCuration,
sendLogGNB,
} from '../../actions/logActions';
import {
continueGetSubCategory,
getSubCategory,
} from "../../actions/mainActions";
import { updatePanel } from "../../actions/panelActions";
import SectionTitle from "../../components/SectionTitle/SectionTitle";
import TBody from "../../components/TBody/TBody";
import TButton, { TYPES } from "../../components/TButton/TButton";
import TButtonTab, { LIST_TYPE } from "../../components/TButtonTab/TButtonTab";
import TDropDown from "../../components/TDropDown/TDropDown";
import THeader from "../../components/THeader/THeader";
import TPanel from "../../components/TPanel/TPanel";
import TVerticalPagenator from "../../components/TVerticalPagenator/TVerticalPagenator";
import usePrevious from "../../hooks/usePrevious";
} from '../../actions/mainActions';
import { updatePanel } from '../../actions/panelActions';
import SectionTitle from '../../components/SectionTitle/SectionTitle';
import TBody from '../../components/TBody/TBody';
import TButton, { TYPES } from '../../components/TButton/TButton';
import TButtonTab, { LIST_TYPE } from '../../components/TButtonTab/TButtonTab';
import TDropDown from '../../components/TDropDown/TDropDown';
import THeader from '../../components/THeader/THeader';
import TPanel from '../../components/TPanel/TPanel';
import TVerticalPagenator
from '../../components/TVerticalPagenator/TVerticalPagenator';
import usePrevious from '../../hooks/usePrevious';
import {
CATEGORY_DATA_MAX_RESULTS_LIMIT,
LOG_MENU,
LOG_TP_NO,
panel_names,
} from "../../utils/Config";
} from '../../utils/Config';
import {
$L,
getSpottableDescendants,
isElementInContainer,
} from "../../utils/helperMethods";
import { SpotlightIds } from "../../utils/SpotlightIds";
import ItemContents from "./CategoryContents/ItemContents/ItemContents";
import ShowContents from "./CategoryContents/ShowContents/ShowContents";
import css from "./CategoryPanel.module.less";
import { sendLogGNB, sendLogCuration } from "../../actions/logActions";
} from '../../utils/helperMethods';
import { SpotlightIds } from '../../utils/SpotlightIds';
import ItemContents from './CategoryContents/ItemContents/ItemContents';
import ShowContents from './CategoryContents/ShowContents/ShowContents';
import css from './CategoryPanel.module.less';
const Container = SpotlightContainerDecorator({ enterTo: null }, "div");
@@ -121,13 +129,15 @@ const CategoryPanel = ({ panelInfo, isOnTop, spotlightId }) => {
const sortTpNm = dropDownTab === 0 ? "New" : "Popular";
logTimerRef.current = setTimeout(() => {
dispatch(sendLogCuration({
cnttTpNm,
lgCatCd,
lgCatNm,
logTpNo: LOG_TP_NO.CURATION.CATEGORY,
sortTpNm,
}));
dispatch(
sendLogCuration({
cnttTpNm,
lgCatCd,
lgCatNm,
logTpNo: LOG_TP_NO.CURATION.CATEGORY,
sortTpNm,
})
);
}, 300);
return () => clearTimeout(logTimerRef.current);
@@ -151,7 +161,9 @@ const CategoryPanel = ({ panelInfo, isOnTop, spotlightId }) => {
tabType: tabType,
filterType: filterType,
},
1, null, true
1,
null,
true
)
);
}
@@ -204,7 +216,7 @@ const CategoryPanel = ({ panelInfo, isOnTop, spotlightId }) => {
reload();
if (categoryFilterCd) {
const detailCdNmValues = categoryFilterCd
.map((item) => item.detailCdNm)
.map((item) => $L(item.detailCdNm))
.reverse();
setFilterMethods(detailCdNmValues);
@@ -422,21 +434,22 @@ const CategoryPanel = ({ panelInfo, isOnTop, spotlightId }) => {
)}
</TPanel>
);
}
};
const propsAreEqual = (prev, next) => {
const keys = Object.keys(prev);
const nextKeys = Object.keys(next);
if(!next.isOnTop){ //ignore event on background
if (!next.isOnTop) {
//ignore event on background
return true;
}
if(keys.length !== nextKeys.length){
if (keys.length !== nextKeys.length) {
return false;
}
for(let i=0; i<keys.length; i++){
if(prev[keys[i]] !== next[keys[i]]){
for (let i = 0; i < keys.length; i++) {
if (prev[keys[i]] !== next[keys[i]]) {
return false;
}
}
return true;
}
};
export default React.memo(CategoryPanel, propsAreEqual);