📌fix: addPlan 버튼 조건부 렌더링 추가
This commit is contained in:
parent
9754fb6049
commit
936b6c0458
@ -1,6 +1,7 @@
|
||||
'use client'
|
||||
|
||||
import { useContext, useEffect } from 'react'
|
||||
import { usePathname } from 'next/navigation'
|
||||
import { useRecoilValue } from 'recoil'
|
||||
import { FloorPlanContext } from '@/app/floor-plan/FloorPlanProvider'
|
||||
import { SessionContext } from '@/app/SessionProvider'
|
||||
@ -12,6 +13,7 @@ import { globalLocaleStore } from '@/store/localeAtom'
|
||||
|
||||
export default function CanvasLayout({ children }) {
|
||||
// const { menuNumber } = props
|
||||
const pathname = usePathname()
|
||||
const { menuNumber } = useCanvasMenu()
|
||||
const { session } = useContext(SessionContext)
|
||||
const { floorPlanState } = useContext(FloorPlanContext)
|
||||
@ -54,7 +56,7 @@ export default function CanvasLayout({ children }) {
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
{plans.length < 10 && (
|
||||
{plans.length < 10 && !pathname.includes('/estimate') && !pathname.includes('/simulator') && (
|
||||
<button
|
||||
className="plane-add"
|
||||
onClick={async () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user