setIsGlobalLoading(false) 추가
This commit is contained in:
parent
1fca294089
commit
6d809a0b65
@ -7,6 +7,8 @@ import { v4 as uuidv4 } from 'uuid'
|
|||||||
import { useMasterController } from '@/hooks/common/useMasterController'
|
import { useMasterController } from '@/hooks/common/useMasterController'
|
||||||
import { basicSettingState, trestleDisplaySelector } from '@/store/settingAtom'
|
import { basicSettingState, trestleDisplaySelector } from '@/store/settingAtom'
|
||||||
import { useSwal } from '@/hooks/useSwal'
|
import { useSwal } from '@/hooks/useSwal'
|
||||||
|
import { useContext } from 'react'
|
||||||
|
import { QcastContext } from '@/app/QcastProvider'
|
||||||
|
|
||||||
// 회로 및 가대설정
|
// 회로 및 가대설정
|
||||||
export const useTrestle = () => {
|
export const useTrestle = () => {
|
||||||
@ -17,10 +19,12 @@ export const useTrestle = () => {
|
|||||||
const roofSizeSet = useRecoilValue(basicSettingState).roofSizeSet
|
const roofSizeSet = useRecoilValue(basicSettingState).roofSizeSet
|
||||||
const isTrestleDisplay = useRecoilValue(trestleDisplaySelector)
|
const isTrestleDisplay = useRecoilValue(trestleDisplaySelector)
|
||||||
const { swalFire } = useSwal()
|
const { swalFire } = useSwal()
|
||||||
|
const { setIsGlobalLoading } = useContext(QcastContext)
|
||||||
const apply = () => {
|
const apply = () => {
|
||||||
const notAllocationModules = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE && !obj.circuit)
|
const notAllocationModules = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.MODULE && !obj.circuit)
|
||||||
if (notAllocationModules.length > 0) {
|
if (notAllocationModules.length > 0) {
|
||||||
swalFire({ text: '回路番号が設定されていないモジュールがあります。 番号を設定しなおすか、 パネルを削除してください。', icon: 'error' })
|
swalFire({ text: '回路番号が設定されていないモジュールがあります。 番号を設定しなおすか、 パネルを削除してください。', icon: 'error' })
|
||||||
|
setIsGlobalLoading(false)
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user