From 8b404648de374beb8c3d8819f7a0925a62d4b2be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A7=80=EC=B2=A0?= Date: Tue, 12 Aug 2025 10:56:53 +0900 Subject: [PATCH] =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/cs/src/pages/site/ui/modify-page.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/cs/src/pages/site/ui/modify-page.tsx b/apps/cs/src/pages/site/ui/modify-page.tsx index 4f0924a07..87bf2a9a5 100644 --- a/apps/cs/src/pages/site/ui/modify-page.tsx +++ b/apps/cs/src/pages/site/ui/modify-page.tsx @@ -15,7 +15,7 @@ function ModifyPage({ siteId }: { siteId: string }) { const queryClient = useQueryClient(); const alert = useAlertStore((state) => state.setMessage); - const { data: siteDetail } = useQuery({ + const { data: siteDetail, error } = useQuery({ queryKey: [ENDPOINT.CMS_SERVICE.SITES, siteId], queryFn: () => SiteApi.siteDetail(siteId), select: (data) => { @@ -26,13 +26,14 @@ function ModifyPage({ siteId }: { siteId: string }) { }; }, enabled: !!siteId, + retry: false, }); useEffect(() => { - if (siteDetail === null && siteId) { + if (error && siteId) { alert("사이트 정보를 찾을 수 없습니다.", () => router.push("/site")); } - }, [siteDetail, siteId]); + }, [error, siteId]); const { mutateAsync: updateSite } = useMutationWrapper({ mutationFn: (data: SiteFormData) => SiteApi.updateSite(siteId, data),