From cfd14e01e5b7a5c0450dd398640783bfb4ae819b Mon Sep 17 00:00:00 2001 From: caadiq Date: Thu, 22 Jan 2026 23:06:54 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20YouTubeEditForm=20=EC=9D=BC=EC=A0=95=20?= =?UTF-8?q?=EC=97=86=EC=9D=84=20=EB=95=8C=20=EC=97=90=EB=9F=AC=20UI=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 존재하지 않는 일정 ID 접근 시 빈 화면 대신 에러 UI 표시 - 이전 페이지/일정 목록 이동 버튼 제공 Co-Authored-By: Claude Opus 4.5 --- .../admin/schedules/edit/YouTubeEditForm.jsx | 60 ++++++++++++++++++- 1 file changed, 57 insertions(+), 3 deletions(-) diff --git a/frontend-temp/src/pages/pc/admin/schedules/edit/YouTubeEditForm.jsx b/frontend-temp/src/pages/pc/admin/schedules/edit/YouTubeEditForm.jsx index 9e0a2f2..25bc715 100644 --- a/frontend-temp/src/pages/pc/admin/schedules/edit/YouTubeEditForm.jsx +++ b/frontend-temp/src/pages/pc/admin/schedules/edit/YouTubeEditForm.jsx @@ -11,6 +11,8 @@ import { ChevronRight, Users, Check, + ArrowLeft, + Calendar, } from "lucide-react"; import AdminLayout from "@/components/pc/admin/layout/Layout"; import Toast from "@/components/common/Toast"; @@ -55,7 +57,7 @@ function YouTubeEditForm() { const [isInitialized, setIsInitialized] = useState(false); // 일정 데이터 로드 - const { data: schedule, isLoading: scheduleLoading } = useQuery({ + const { data: schedule, isLoading: scheduleLoading, isError: scheduleError } = useQuery({ queryKey: ["schedule", id], queryFn: async () => { const token = localStorage.getItem("adminToken"); @@ -66,6 +68,7 @@ function YouTubeEditForm() { return res.json(); }, enabled: isAuthenticated && !!id, + retry: false, }); // 멤버 목록 로드 @@ -173,8 +176,59 @@ function YouTubeEditForm() { ); } - if (!schedule) { - return null; + if (scheduleError || !schedule) { + return ( + +
+
+ +
+ +
+
+ +

+ 일정을 찾을 수 없습니다 +

+

+ 요청하신 일정이 존재하지 않거나 삭제되었을 수 있습니다. +

+
+ + + + + 일정 목록 + + +
+
+
+ ); } const videoUrl = videoType === "shorts"