diff --git a/.env.development b/.env.development index 6488b496..1ca922e7 100644 --- a/.env.development +++ b/.env.development @@ -2,6 +2,8 @@ NEXT_PUBLIC_API_SERVER_PATH="http://1.248.227.176:38080" NEXT_PUBLIC_HOST_URL="//1.248.227.176:4000" +NEXT_PUBLIC_API_HOST_URL="http://1.248.227.176:5000" + SESSION_SECRET="i3iHH1yp2/2SpQSIySQ4bpyc4g0D+zCF9FAn5xUG0+Y=" # NEXT_PUBLIC_CONVERTER_API_URL="https://v2.convertapi.com/convert/dwg/to/png?Secret=secret_bV5zuYMyyIYFlOb3" diff --git a/.env.production b/.env.production index 767c3e4b..3842b041 100644 --- a/.env.production +++ b/.env.production @@ -2,6 +2,8 @@ NEXT_PUBLIC_API_SERVER_PATH="https://api.hanasys.jp/" NEXT_PUBLIC_HOST_URL="//1.248.227.176:4000" +NEXT_PUBLIC_API_HOST_URL="https://www.hanasys.jp/" + SESSION_SECRET="i3iHH1yp2/2SpQSIySQ4bpyc4g0D+zCF9FAn5xUG0+Y=" # NEXT_PUBLIC_CONVERTER_API_URL="https://v2.convertapi.com/convert/dwg/to/png?Secret=secret_bV5zuYMyyIYFlOb3" diff --git a/src/hooks/common/useCanvasPopupStatusController.js b/src/hooks/common/useCanvasPopupStatusController.js index b6499099..e7bd8457 100644 --- a/src/hooks/common/useCanvasPopupStatusController.js +++ b/src/hooks/common/useCanvasPopupStatusController.js @@ -37,6 +37,7 @@ export function useCanvasPopupStatusController(param = 1) { * @returns */ const getModuleSelection = async (popupTypeParam) => { + if (!currentCanvasPlan.objectNo || !currentCanvasPlan.planNo) return const result = await promiseGet({ url: `/api/v1/canvas-popup-status?objectNo=${currentCanvasPlan.objectNo}&planNo=${currentCanvasPlan.planNo}&popupType=${popupTypeParam}`, }) @@ -48,7 +49,7 @@ export function useCanvasPopupStatusController(param = 1) { return null }) - return result.data + return result?.data } /** @@ -59,7 +60,7 @@ export function useCanvasPopupStatusController(param = 1) { let resultData = {} for (let i = 1; i < 3; i++) { const result = await getModuleSelection(i) - if (!result.objectNo) return + if (!result?.objectNo) return if (i === 1) { if (result.popupStatus && unescapeString(result.popupStatus)) { const data = JSON.parse(unescapeString(result.popupStatus)) diff --git a/src/hooks/floorPlan/useImgLoader.js b/src/hooks/floorPlan/useImgLoader.js index 2a5a09ab..ca5fef79 100644 --- a/src/hooks/floorPlan/useImgLoader.js +++ b/src/hooks/floorPlan/useImgLoader.js @@ -79,8 +79,8 @@ export function useImgLoader() { /** 이미지 크롭 요청 */ const result = await post({ - // url: `${process.env.NEXT_PUBLIC_HOST_URL}/image/canvas`, - url: `http://localhost:3000/api/image/canvas`, + // url: `${process.env.NEXT_PUBLIC_API_HOST_URL}/image/canvas`, + url: `${process.env.NEXT_PUBLIC_API_HOST_URL}/api/image/canvas`, data: formData, }) console.log('🚀 ~ handleCanvasToPng ~ result:', result) diff --git a/src/hooks/surface/useSurfaceShapeBatch.js b/src/hooks/surface/useSurfaceShapeBatch.js index 16f68668..863de4bf 100644 --- a/src/hooks/surface/useSurfaceShapeBatch.js +++ b/src/hooks/surface/useSurfaceShapeBatch.js @@ -72,16 +72,12 @@ export function useSurfaceShapeBatch({ isHidden, setIsHidden }) { length5 = surfaceRefs.length5.current.value } - console.log(' before length : ', length1, length2, length3, length4, length5) - length1 = parseFloat(length1 === undefined ? 0 : Number(length1 / 10).toFixed(1)) length2 = parseFloat(length2 === undefined ? 0 : Number(length2 / 10).toFixed(1)) length3 = parseFloat(length3 === undefined ? 0 : Number(length3 / 10).toFixed(1)) length4 = parseFloat(length4 === undefined ? 0 : Number(length4 / 10).toFixed(1)) length5 = parseFloat(length5 === undefined ? 0 : Number(length5 / 10).toFixed(1)) - console.log(' after length : ', length1, length2, length3, length4, length5) - let isDrawing = true let obj = null let points = []