From 9fa665c9c0d94ac8a30a5dd065479eefec32ef1c Mon Sep 17 00:00:00 2001 From: tolelom <98kimsungmin@naver.com> Date: Tue, 24 Feb 2026 14:39:26 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=8B=A4=EC=9A=B4=EB=A1=9C=EB=93=9C=20?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=EC=97=86=EC=9D=84=20=EB=95=8C=20=EC=A4=80?= =?UTF-8?q?=EB=B9=84=EC=A4=91=20=EB=A9=94=EC=8B=9C=EC=A7=80=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 404 응답 시 컴포넌트가 사라지는 대신 안내 문구 노출 Co-Authored-By: Claude Sonnet 4.6 --- src/components/DownloadSection.css | 6 ++++++ src/components/DownloadSection.jsx | 25 +++++++++++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/components/DownloadSection.css b/src/components/DownloadSection.css index 428fef6..11bcef2 100644 --- a/src/components/DownloadSection.css +++ b/src/components/DownloadSection.css @@ -38,3 +38,9 @@ opacity: 0.9; transform: translateY(-1px); } + +.download-preparing { + font-size: 0.9rem; + color: rgba(255, 255, 255, 0.4); + margin: 0; +} diff --git a/src/components/DownloadSection.jsx b/src/components/DownloadSection.jsx index daab2a0..e918b29 100644 --- a/src/components/DownloadSection.jsx +++ b/src/components/DownloadSection.jsx @@ -6,11 +6,14 @@ import './DownloadSection.css'; export default function DownloadSection() { const [info, setInfo] = useState(null); + const [ready, setReady] = useState(false); const { user } = useAuth(); const navigate = useNavigate(); useEffect(() => { - getDownloadInfo().then(setInfo); + getDownloadInfo() + .then((data) => { setInfo(data); setReady(true); }) + .catch(() => setReady(true)); }, []); const handleDownload = (e) => { @@ -20,18 +23,24 @@ export default function DownloadSection() { } }; - if (!info) return null; + if (!ready) return null; return (

게임 런처 다운로드

-

- {info.fileName} · {info.fileSize} · {info.version} -

- - {user ? '다운로드' : '로그인 후 다운로드'} - + {info ? ( + <> +

+ {info.fileName} · {info.fileSize} · {info.version} +

+ + {user ? '다운로드' : '로그인 후 다운로드'} + + + ) : ( +

런처 준비 중입니다. 잠시 후 다시 확인해주세요.

+ )}
);