From a0cca5fbca70fcb1665823dde421284fb18f1327 Mon Sep 17 00:00:00 2001 From: yjnoh Date: Tue, 10 Jun 2025 10:34:51 +0900 Subject: [PATCH] =?UTF-8?q?[1092]=20:=20[=E7=89=B9=E5=AE=9A=E3=81=AE?= =?UTF-8?q?=E7=B5=84=E3=81=BF=E5=90=88=E3=82=8F=E3=81=9B=E3=81=AE=E6=99=82?= =?UTF-8?q?=E3=80=81=E5=9B=9E=E8=B7=AF=E5=89=B2=E4=BB=98=E5=BE=8C=E3=81=AE?= =?UTF-8?q?=E3=83=87=E3=83=BC=E3=82=BF=E3=83=AD=E3=83=BC=E3=83=87=E3=82=A3?= =?UTF-8?q?=E3=83=B3=E3=82=B0=E3=81=8C=E7=B5=82=E3=82=8F=E3=82=89=E3=81=AA?= =?UTF-8?q?=E3=81=84]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [작업내용] : 가대 생성시 api 호출 부분에 try catch로 로딩바 제거 로직 추가 --- src/hooks/common/useMasterController.js | 11 ++++++++--- src/hooks/usePlan.js | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/hooks/common/useMasterController.js b/src/hooks/common/useMasterController.js index 21220726..dae68c69 100644 --- a/src/hooks/common/useMasterController.js +++ b/src/hooks/common/useMasterController.js @@ -212,9 +212,14 @@ export function useMasterController() { } const getQuotationItem = async (params) => { - return await post({ url: '/api/v1/master/getQuotationItem', data: params }).then((res) => { - return res - }) + return await post({ url: '/api/v1/master/getQuotationItem', data: params }) + .then((res) => { + return res + }) + .catch((error) => { + console.log('🚀 ~ getQuotationItem ~ error:', error) + setIsGlobalLoading(false) + }) } /** diff --git a/src/hooks/usePlan.js b/src/hooks/usePlan.js index 52c60f80..ba8776d4 100644 --- a/src/hooks/usePlan.js +++ b/src/hooks/usePlan.js @@ -343,6 +343,7 @@ export function usePlan(params = {}) { }) .catch((error) => { swalFire({ text: error.message, icon: 'error' }) + setIsGlobalLoading(false) }) return rtn }