📌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 [moduleSelectionDataStore, setModuleSelectionDataStore] = useRecoilState(moduleSelectionDataState)
|
||||
const { getFetcher, postFetcher } = useAxios()
|
||||
const { get, getFetcher, postFetcher } = useAxios()
|
||||
|
||||
const currentCanvasPlan = useRecoilValue(currentCanvasPlanState)
|
||||
// console.log('🚀 ~ Orientation ~ currentCanvasPlan:', currentCanvasPlan)
|
||||
@ -25,16 +25,20 @@ export function useCanvasPopupStatusController(param = 1) {
|
||||
* @returns
|
||||
*/
|
||||
const getModuleSelection = async (popupTypeParam) => {
|
||||
const {
|
||||
data: popupStatus,
|
||||
error,
|
||||
isLoading,
|
||||
} = useSWR(
|
||||
`/api/v1/canvas-popup-status?objectNo=${currentCanvasPlan.objectNo}&planNo=${currentCanvasPlan.planNo}&popupType=${popupTypeParam}`,
|
||||
getFetcher,
|
||||
)
|
||||
// const {
|
||||
// data: popupStatus,
|
||||
// error,
|
||||
// isLoading,
|
||||
// } = useSWR(
|
||||
// `/api/v1/canvas-popup-status?objectNo=${currentCanvasPlan.objectNo}&planNo=${currentCanvasPlan.planNo}&popupType=${popupTypeParam}`,
|
||||
// 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