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"