From d1bdfdfde123f99227beada1b74810325ba15285 Mon Sep 17 00:00:00 2001 From: "opacity@t-win.kr" Date: Wed, 27 Aug 2025 18:25:00 +0900 Subject: [PATCH] =?UTF-8?q?Revert=20"debug=20=EA=B0=92=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 4a4f585e913669781b92102c90bfd63084f3dfb5. --- .../src/views/MainView/MainView.jsx | 106 +++--------------- 1 file changed, 18 insertions(+), 88 deletions(-) diff --git a/com.twin.app.shoptime/src/views/MainView/MainView.jsx b/com.twin.app.shoptime/src/views/MainView/MainView.jsx index 6d6ec92e..e46d8383 100644 --- a/com.twin.app.shoptime/src/views/MainView/MainView.jsx +++ b/com.twin.app.shoptime/src/views/MainView/MainView.jsx @@ -894,17 +894,10 @@ export default function MainView({ className, initService }) { {(() => { try { // 항상 모든 정보를 표시 - const windowExists = typeof window === "object"; - const palmSystemExists = windowExists && !!window.PalmSystem; - const launchParamsExists = - palmSystemExists && - window.PalmSystem.launchParams !== undefined; - const launchParamsValue = palmSystemExists - ? window.PalmSystem.launchParams - : null; - const launchParamsType = palmSystemExists - ? typeof window.PalmSystem.launchParams - : "N/A"; + const hasWebOS = + typeof window === "object" && + window.PalmSystem && + window.PalmSystem.launchParams; let raw = "N/A"; let parsed = {}; @@ -913,8 +906,7 @@ export default function MainView({ className, initService }) { let contentTarget = "N/A"; let parseError = null; - // TV에서 launch params가 빈 문자열이거나 null일 수 있음 - if (launchParamsExists && launchParamsValue) { + if (hasWebOS) { try { raw = window.PalmSystem.launchParams; parsed = JSON.parse(raw); @@ -927,47 +919,13 @@ export default function MainView({ className, initService }) { } } - // Redux에서 가져온 contentTarget (비교용) - const reduxContentTarget = deepLinkInfo.contentTarget; - - // getLaunchParams() 함수 결과 확인 - let getLaunchParamsResult = {}; - try { - // helperMethods.js의 getLaunchParams 함수 직접 호출 - if ( - typeof window === "object" && - window.PalmSystem && - window.PalmSystem.launchParams - ) { - getLaunchParamsResult = JSON.parse( - window.PalmSystem.launchParams - ); - if ( - getLaunchParamsResult[ - "x-webos-app-container-launch" - ] === true - ) { - getLaunchParamsResult = getLaunchParamsResult.details; - } - } else { - // localLaunchParams가 반환될 것임 - getLaunchParamsResult = { - source: "localLaunchParams (fallback)", - }; - } - } catch (e) { - getLaunchParamsResult = { error: e.message }; - } - return ( <>
- webOS환경: {palmSystemExists ? "✓" : "✗"} + webOS환경: {hasWebOS ? "✓" : "✗"}
@@ -1023,45 +981,17 @@ export default function MainView({ className, initService }) {
-
- launch contentTarget:{" "} - - {contentTarget || "MISSING"} - -
-
- redux contentTarget:{" "} - - {reduxContentTarget || "MISSING"} - -
-
-
- getLaunchParams() 결과: -
-
- {JSON.stringify(getLaunchParamsResult, null, 2)} -
-
+ contentTarget:{" "} + + {contentTarget || "MISSING"} +
{parseError && (