diff --git a/src/hooks/floorPlan/estimate/useEstimateController.js b/src/hooks/floorPlan/estimate/useEstimateController.js index 19dbac5e..c9bfa59c 100644 --- a/src/hooks/floorPlan/estimate/useEstimateController.js +++ b/src/hooks/floorPlan/estimate/useEstimateController.js @@ -7,6 +7,7 @@ import { isObjectNotEmpty } from '@/util/common-utils' import { SessionContext } from '@/app/SessionProvider' import { useMessage } from '@/hooks/useMessage' import { useRouter } from 'next/navigation' +import { FloorPlanContext } from '@/app/floor-plan/FloorPlanProvider' const reducer = (prevState, nextState) => { return { ...prevState, ...nextState } @@ -46,7 +47,8 @@ export const useEstimateController = (planNo) => { const { promiseGet, get, post, promisePost } = useAxios(globalLocaleState) const [isLoading, setIsLoading] = useState(false) - const [state, setState] = useReducer(reducer, defaultEstimateData) + // const [state, setState] = useReducer(reducer, defaultEstimateData) + const { estimateContextState, setEstimateContextState } = useContext(FloorPlanContext) const [newState, setNewState] = useState({}) useEffect(() => {