📌chore: Remove unused context

This commit is contained in:
yoosangwook 2025-01-20 14:42:30 +09:00
parent 57f449336a
commit f2740ac32f

View File

@ -27,12 +27,12 @@ const defaultEstimateData = {
* 모듈,회로 구성 상태 데이터 * 모듈,회로 구성 상태 데이터
* 설정 팝업 상태를 저장하는 데이터 * 설정 팝업 상태를 저장하는 데이터
*/ */
const defaultProcessStep = { // const defaultProcessStep = {
gnbStep: 0, // gnbStep: 0,
processStep: 0, // processStep: 0,
moduleCofigureData: {}, // moduleCofigureData: {},
pcsConfigureData: {}, // pcsConfigureData: {},
} // }
export const FloorPlanContext = createContext({ export const FloorPlanContext = createContext({
floorPlanState: {}, floorPlanState: {},
@ -49,12 +49,12 @@ const FloorPlanProvider = ({ children }) => {
const pid = searchParams.get('pid') const pid = searchParams.get('pid')
//useEffect(() => { // 오류 발생으로 useEffect 사용 //useEffect(() => { // 오류 발생으로 useEffect 사용
if (pathname === '/floor-plan') { if (pathname === '/floor-plan') {
if (pid === undefined || pid === '' || pid === null || objectNo === undefined || objectNo === '' || objectNo === null) { if (pid === undefined || pid === '' || pid === null || objectNo === undefined || objectNo === '' || objectNo === null) {
notFound() notFound()
}
setCurrentObjectNo(objectNo)
} }
setCurrentObjectNo(objectNo)
}
//}, [pid, objectNo]) //}, [pid, objectNo])
const [floorPlanState, setFloorPlanState] = useState({ const [floorPlanState, setFloorPlanState] = useState({
@ -70,12 +70,10 @@ const FloorPlanProvider = ({ children }) => {
const [estimateContextState, setEstimateContextState] = useReducer(reducer, defaultEstimateData) const [estimateContextState, setEstimateContextState] = useReducer(reducer, defaultEstimateData)
const [processStepState, setProcessStepState] = useReducer(reducer, defaultProcessStep) // const [processStepState, setProcessStepState] = useReducer(reducer, defaultProcessStep)
return ( return (
<FloorPlanContext.Provider <FloorPlanContext.Provider value={{ floorPlanState, setFloorPlanState, estimateContextState, setEstimateContextState }}>
value={{ floorPlanState, setFloorPlanState, estimateContextState, setEstimateContextState, processStepState, setProcessStepState }}
>
{children} {children}
</FloorPlanContext.Provider> </FloorPlanContext.Provider>
) )