From 1e6a3b70151eda485020ccf1dd76c2b8772c5c11 Mon Sep 17 00:00:00 2001 From: "hyunwoo93.cha" Date: Fri, 17 Jan 2025 13:25:36 +0900 Subject: [PATCH] =?UTF-8?q?Revert=20"[=EC=A7=80=EB=9D=BC=EC=9D=B4=EC=8A=88?= =?UTF-8?q?=EC=97=86=EC=9D=8C]=20getErrorMessage=20errorCode=EA=B0=80=20nu?= =?UTF-8?q?ll=EC=9D=BC=20=EA=B2=BD=EC=9A=B0=20=EB=85=B8=EC=B6=9C=20?= =?UTF-8?q?=EC=95=88=20=EB=90=98=EB=8F=84=EB=A1=9D=20=EC=B2=98=EB=A6=AC"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 155a152e04cd53568796207c8dd7b39fc1af2fd3. --- .../src/components/TabLayout/TabLayout.jsx | 29 ++----------------- .../src/utils/helperMethods.js | 8 ++--- 2 files changed, 6 insertions(+), 31 deletions(-) diff --git a/com.twin.app.shoptime/src/components/TabLayout/TabLayout.jsx b/com.twin.app.shoptime/src/components/TabLayout/TabLayout.jsx index 0878e154..89915d7c 100644 --- a/com.twin.app.shoptime/src/components/TabLayout/TabLayout.jsx +++ b/com.twin.app.shoptime/src/components/TabLayout/TabLayout.jsx @@ -448,36 +448,13 @@ export default function TabLayout({ topPanelName, onTabActivated, panelInfo }) { } }, [showSubTab]); - const spotToPanelJob = useRef( - new Job(() => { - const node = document.querySelector(`[id="${SpotlightIds.TPANEL}"]`); - - if (node) { - Spotlight.focus(node); - } - }) - ); - - const spotToPanel = useCallback((delayed = false) => { + const spotToPanel = useCallback(() => { const node = document.querySelector(`[id="${SpotlightIds.TPANEL}"]`); - if (node) { - if (delayed) { - spotToPanelJob.current.start(() => { - Spotlight.focus(node); - }); - } else { - Spotlight.focus(node); - } + Spotlight.focus(node); } }, []); - useEffect(() => { - return () => { - spotToPanelJob.current.stop(); - }; - }, []); - const handleNavigation = useCallback( ({ index, target }) => { setMainSelectedIndex(index); @@ -504,7 +481,7 @@ export default function TabLayout({ topPanelName, onTabActivated, panelInfo }) { // 홈패널일 경우 if (target && target[0]?.name === panel_names.HOME_PANEL) { deActivateTab(); - spotToPanel(true); + spotToPanel(); dispatch(resetPanels()); dispatch(checkEnterThroughGNB(true)); dispatch(resetHomeInfo()); diff --git a/com.twin.app.shoptime/src/utils/helperMethods.js b/com.twin.app.shoptime/src/utils/helperMethods.js index 2c894a4c..2f6a394b 100644 --- a/com.twin.app.shoptime/src/utils/helperMethods.js +++ b/com.twin.app.shoptime/src/utils/helperMethods.js @@ -547,11 +547,9 @@ export const getErrorMessage = (errorCode, retMsg, retDetailCode) => { group.codes.includes(Number(errorCode)) ); - const errorPrefix = errorCode - ? retDetailCode - ? `[${errorCode}-${retDetailCode}] ` - : `[${errorCode}] ` - : ""; + const errorPrefix = retDetailCode + ? `[${errorCode}-${retDetailCode}] ` + : `[${errorCode}] `; if (group) { return errorPrefix + group.message;