📌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 = {
gnbStep: 0,
processStep: 0,
moduleCofigureData: {},
pcsConfigureData: {},
}
// const defaultProcessStep = {
// gnbStep: 0,
// processStep: 0,
// moduleCofigureData: {},
// pcsConfigureData: {},
// }
export const FloorPlanContext = createContext({
floorPlanState: {},
@ -49,12 +49,12 @@ const FloorPlanProvider = ({ children }) => {
const pid = searchParams.get('pid')
//useEffect(() => { // 오류 발생으로 useEffect 사용
if (pathname === '/floor-plan') {
if (pid === undefined || pid === '' || pid === null || objectNo === undefined || objectNo === '' || objectNo === null) {
notFound()
}
setCurrentObjectNo(objectNo)
if (pathname === '/floor-plan') {
if (pid === undefined || pid === '' || pid === null || objectNo === undefined || objectNo === '' || objectNo === null) {
notFound()
}
setCurrentObjectNo(objectNo)
}
//}, [pid, objectNo])
const [floorPlanState, setFloorPlanState] = useState({
@ -70,12 +70,10 @@ const FloorPlanProvider = ({ children }) => {
const [estimateContextState, setEstimateContextState] = useReducer(reducer, defaultEstimateData)
const [processStepState, setProcessStepState] = useReducer(reducer, defaultProcessStep)
// const [processStepState, setProcessStepState] = useReducer(reducer, defaultProcessStep)
return (
<FloorPlanContext.Provider
value={{ floorPlanState, setFloorPlanState, estimateContextState, setEstimateContextState, processStepState, setProcessStepState }}
>
<FloorPlanContext.Provider value={{ floorPlanState, setFloorPlanState, estimateContextState, setEstimateContextState }}>
{children}
</FloorPlanContext.Provider>
)