fix: modify variable name
This commit is contained in:
parent
be137225c3
commit
137c268561
@ -25,8 +25,8 @@ const defaultEstimateData = {
|
|||||||
export const FloorPlanContext = createContext({
|
export const FloorPlanContext = createContext({
|
||||||
floorPlanState: {},
|
floorPlanState: {},
|
||||||
setFloorPlanState: () => {},
|
setFloorPlanState: () => {},
|
||||||
estimateState: {},
|
estimateContextState: {},
|
||||||
setEstimateState: () => {},
|
setEstimateContextState: () => {},
|
||||||
})
|
})
|
||||||
|
|
||||||
const FloorPlanProvider = ({ children }) => {
|
const FloorPlanProvider = ({ children }) => {
|
||||||
@ -37,14 +37,16 @@ const FloorPlanProvider = ({ children }) => {
|
|||||||
toggleRotate: false,
|
toggleRotate: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
const [estimateState, setEstimateState] = useReducer(reducer, defaultEstimateData)
|
const [estimateContextState, setEstimateContextState] = useReducer(reducer, defaultEstimateData)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log('🚀 ~ floorPlanState:', floorPlanState)
|
console.log('🚀 ~ floorPlanState:', floorPlanState)
|
||||||
}, [floorPlanState])
|
}, [floorPlanState])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FloorPlanContext.Provider value={{ floorPlanState, setFloorPlanState, estimateState, setEstimateState }}>{children}</FloorPlanContext.Provider>
|
<FloorPlanContext.Provider value={{ floorPlanState, setFloorPlanState, estimateContextState, setEstimateContextState }}>
|
||||||
|
{children}
|
||||||
|
</FloorPlanContext.Provider>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user