fix: modify variable name

This commit is contained in:
yoosangwook 2024-11-20 16:46:12 +09:00
parent be137225c3
commit 137c268561

View File

@ -25,8 +25,8 @@ const defaultEstimateData = {
export const FloorPlanContext = createContext({
floorPlanState: {},
setFloorPlanState: () => {},
estimateState: {},
setEstimateState: () => {},
estimateContextState: {},
setEstimateContextState: () => {},
})
const FloorPlanProvider = ({ children }) => {
@ -37,14 +37,16 @@ const FloorPlanProvider = ({ children }) => {
toggleRotate: false,
})
const [estimateState, setEstimateState] = useReducer(reducer, defaultEstimateData)
const [estimateContextState, setEstimateContextState] = useReducer(reducer, defaultEstimateData)
useEffect(() => {
console.log('🚀 ~ floorPlanState:', floorPlanState)
}, [floorPlanState])
return (
<FloorPlanContext.Provider value={{ floorPlanState, setFloorPlanState, estimateState, setEstimateState }}>{children}</FloorPlanContext.Provider>
<FloorPlanContext.Provider value={{ floorPlanState, setFloorPlanState, estimateContextState, setEstimateContextState }}>
{children}
</FloorPlanContext.Provider>
)
}