diff --git a/src/app/floor-plan/FloorPlanProvider.js b/src/app/floor-plan/FloorPlanProvider.js index 59a05edb..ba2a8226 100644 --- a/src/app/floor-plan/FloorPlanProvider.js +++ b/src/app/floor-plan/FloorPlanProvider.js @@ -4,7 +4,7 @@ import { correntObjectNoState } from '@/store/settingAtom' import { notFound, usePathname, useSearchParams } from 'next/navigation' // import { ErrorBoundary } from 'next/dist/client/components/error-boundary' // import ServerError from '../error' -import { createContext, useEffect, useReducer, useState } from 'react' +import { createContext, useReducer, useState } from 'react' import { useSetRecoilState } from 'recoil' const reducer = (prevState, nextState) => { @@ -40,7 +40,7 @@ const FloorPlanProvider = ({ children }) => { const pid = searchParams.get('pid') if (pathname === '/floor-plan') { - if (pid === undefined || pid === '' || objectNo === undefined || objectNo === '') { + if (pid === undefined || pid === '' || pid === null || objectNo === undefined || objectNo === '' || objectNo === null) { notFound() } setCurrentObjectNo(objectNo) @@ -57,10 +57,6 @@ const FloorPlanProvider = ({ children }) => { pid, }) - useEffect(() => { - console.log('🚀 ~ FloorPlanProvider ~ floorPlanState:', floorPlanState) - }, [floorPlanState]) - const [estimateContextState, setEstimateContextState] = useReducer(reducer, defaultEstimateData) return (