📌fix: 조회 함수 구조 수정
This commit is contained in:
parent
6966e694fe
commit
05ce0c11e3
@ -14,7 +14,7 @@ export function useCanvasPopupStatusController(param = 1) {
|
|||||||
|
|
||||||
const [compasDeg, setCompasDeg] = useRecoilState(compasDegAtom)
|
const [compasDeg, setCompasDeg] = useRecoilState(compasDegAtom)
|
||||||
const [moduleSelectionDataStore, setModuleSelectionDataStore] = useRecoilState(moduleSelectionDataState)
|
const [moduleSelectionDataStore, setModuleSelectionDataStore] = useRecoilState(moduleSelectionDataState)
|
||||||
const { getFetcher, postFetcher } = useAxios()
|
const { get, getFetcher, postFetcher } = useAxios()
|
||||||
|
|
||||||
const currentCanvasPlan = useRecoilValue(currentCanvasPlanState)
|
const currentCanvasPlan = useRecoilValue(currentCanvasPlanState)
|
||||||
// console.log('🚀 ~ Orientation ~ currentCanvasPlan:', currentCanvasPlan)
|
// console.log('🚀 ~ Orientation ~ currentCanvasPlan:', currentCanvasPlan)
|
||||||
@ -25,16 +25,20 @@ export function useCanvasPopupStatusController(param = 1) {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
const getModuleSelection = async (popupTypeParam) => {
|
const getModuleSelection = async (popupTypeParam) => {
|
||||||
const {
|
// const {
|
||||||
data: popupStatus,
|
// data: popupStatus,
|
||||||
error,
|
// error,
|
||||||
isLoading,
|
// isLoading,
|
||||||
} = useSWR(
|
// } = useSWR(
|
||||||
`/api/v1/canvas-popup-status?objectNo=${currentCanvasPlan.objectNo}&planNo=${currentCanvasPlan.planNo}&popupType=${popupTypeParam}`,
|
// `/api/v1/canvas-popup-status?objectNo=${currentCanvasPlan.objectNo}&planNo=${currentCanvasPlan.planNo}&popupType=${popupTypeParam}`,
|
||||||
getFetcher,
|
// getFetcher,
|
||||||
)
|
// )
|
||||||
|
|
||||||
return popupStatus
|
const res = await get({
|
||||||
|
url: `/api/v1/canvas-popup-status?objectNo=${currentCanvasPlan.objectNo}&planNo=${currentCanvasPlan.planNo}&popupType=${popupTypeParam}`,
|
||||||
|
})
|
||||||
|
|
||||||
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user