From 28d408ace5bb9f98602c835694cb07d4d6659872 Mon Sep 17 00:00:00 2001 From: caadiq Date: Thu, 22 Jan 2026 18:58:29 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=83=9C=EB=B8=94=EB=A6=BF=EC=97=90?= =?UTF-8?q?=EC=84=9C=20PC=20=EB=B7=B0=20=ED=91=9C=EC=8B=9C=EB=90=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - BrowserView/MobileView → isMobileOnly 조건부 렌더링으로 변경 - 태블릿은 PC 뷰로 표시 - 모바일(폰)만 Mobile 뷰로 표시 Co-Authored-By: Claude Opus 4.5 --- frontend-temp/src/App.jsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/frontend-temp/src/App.jsx b/frontend-temp/src/App.jsx index f88a681..7f6ed4a 100644 --- a/frontend-temp/src/App.jsx +++ b/frontend-temp/src/App.jsx @@ -1,6 +1,6 @@ import { useEffect } from 'react'; import { BrowserRouter, Routes, Route } from 'react-router-dom'; -import { BrowserView, MobileView } from 'react-device-detect'; +import { isMobileOnly } from 'react-device-detect'; // 공통 컴포넌트 import { ScrollToTop } from '@/components/common'; @@ -52,14 +52,16 @@ function PCWrapper({ children }) { /** * 프로미스나인 팬사이트 메인 앱 * react-device-detect를 사용한 PC/Mobile 분리 + * - PC, 태블릿: PC 뷰 + * - 모바일(폰): Mobile 뷰 */ function App() { return ( - {/* PC 뷰 */} - + {/* PC + 태블릿 뷰 */} + {!isMobileOnly && ( {/* 관리자 페이지 (레이아웃 없음) */} @@ -88,10 +90,10 @@ function App() { /> - + )} - {/* Mobile 뷰 */} - + {/* Mobile 뷰 (폰만) */} + {isMobileOnly && ( } /> - + )} ); }