[통합로그API No.6] second Deth Menu 로그 정보 수집

This commit is contained in:
dongyoungKo
2025-05-15 14:58:30 +09:00
parent 2cc00fbcd2
commit 43271e1a35
4 changed files with 23 additions and 3 deletions

View File

@@ -8,6 +8,9 @@ import { Marquee, MarqueeController } from "@enact/sandstone/Marquee";
import Spottable from "@enact/spotlight/Spottable";
import css from "./TabItemSub.module.less";
import { sendLogTotalRecommend } from "../../actions/logActions";
import { LOG_CONTEXT_NAME, LOG_MESSAGE_ID } from "../../utils/Config";
import { useDispatch } from "react-redux";
const SpottableComponent = Spottable("div");
@@ -15,6 +18,7 @@ const TabItemBase = ({
selected = false,
expanded = false,
index = 0,
mainMenuTitle,
title,
target,
deActivateTab,
@@ -33,12 +37,14 @@ const TabItemBase = ({
...rest
}) => {
const [focused, setFocused] = useState(false);
const dispatch = useDispatch();
const itemRef = useRef();
const clearPressedJob = useRef(new Job((func) => func(), 0));
const _onClick = useCallback(
(ev) => {
const subtitle = title.split("-")[0];
clearPressedJob.current.start(() => {
if (itemId) {
setSelectedSubItemId(itemId);
@@ -51,6 +57,15 @@ const TabItemBase = ({
if (onClick) {
onClick({ target, itemId });
}
dispatch(
sendLogTotalRecommend({
contextName: LOG_CONTEXT_NAME.GNB,
messageId: LOG_MESSAGE_ID.GNB,
preButtonTitle: mainMenuTitle,
buttonTitle: patncNm ? patncNm : subtitle,
})
);
});
},
[target, itemId, onClick, spotlightId, setSelectedSubItemId, setLastFocusId]