From 6d809a0b656d7de4983d5ea458ddf39be1dd1ee6 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Tue, 11 Feb 2025 16:34:36 +0900 Subject: [PATCH] =?UTF-8?q?setIsGlobalLoading(false)=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/module/useTrestle.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hooks/module/useTrestle.js b/src/hooks/module/useTrestle.js index 2c9e43ad..a9289861 100644 --- a/src/hooks/module/useTrestle.js +++ b/src/hooks/module/useTrestle.js @@ -7,6 +7,8 @@ import { v4 as uuidv4 } from 'uuid' import { useMasterController } from '@/hooks/common/useMasterController' import { basicSettingState, trestleDisplaySelector } from '@/store/settingAtom' import { useSwal } from '@/hooks/useSwal' +import { useContext } from 'react' +import { QcastContext } from '@/app/QcastProvider' // 회로 및 가대설정 export const useTrestle = () => { @@ -17,10 +19,12 @@ export const useTrestle = () => { const roofSizeSet = useRecoilValue(basicSettingState).roofSizeSet const isTrestleDisplay = useRecoilValue(trestleDisplaySelector) const { swalFire } = useSwal() + const { setIsGlobalLoading } = useContext(QcastContext) const apply = () => { const notAllocationModules = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE && !obj.circuit) if (notAllocationModules.length > 0) { swalFire({ text: '回路番号が設定されていないモジュールがあります。 番号を設定しなおすか、 パネルを削除してください。', icon: 'error' }) + setIsGlobalLoading(false) return null } try {