🚨fix: context menu 조정

This commit is contained in:
yoosangwook 2025-01-21 17:51:05 +09:00
parent 725d1a7dc5
commit 5351deed0f

View File

@ -16,12 +16,14 @@ export default function FloorPlan({ children }) {
const searchParams = useSearchParams()
const objectNo = searchParams.get('objectNo')
const pid = searchParams.get('pid')
if (pathname === '/floor-plan') {
if (pid === undefined || pid === '' || pid === null || objectNo === undefined || objectNo === '' || objectNo === null) {
notFound()
useEffect(() => {
if (pathname === '/floor-plan') {
if (pid === undefined || pid === '' || pid === null || objectNo === undefined || objectNo === '' || objectNo === null) {
notFound()
}
setCurrentObjectNo(objectNo)
}
setCurrentObjectNo(objectNo)
}
}, [pathname])
const { closeAll } = usePopup()
const { menuNumber, setMenuNumber } = useCanvasMenu()