mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-03-01 12:44:17 +00:00
reset layer
This commit is contained in:
parent
e6eac5ff06
commit
645d2c5d7d
@ -1,10 +1,8 @@
|
||||
import { useEffect, useState } from 'react'
|
||||
|
||||
import { useSetItemsApi, useSetItemsData } from './hooks/useItems'
|
||||
import { usePopupForm } from './hooks/usePopupForm'
|
||||
import { useAddTag } from './hooks/useTags'
|
||||
import LayerContext from './LayerContext'
|
||||
import { ItemFormPopup } from './Subcomponents/ItemFormPopup'
|
||||
|
||||
import type { LayerProps } from '#types/LayerProps'
|
||||
import type { Tag } from '#types/Tag'
|
||||
@ -44,7 +42,6 @@ export const Layer = ({
|
||||
const addTag = useAddTag()
|
||||
const [newTagsToAdd] = useState<Tag[]>([])
|
||||
const [tagsReady] = useState<boolean>(false)
|
||||
const { popupForm } = usePopupForm()
|
||||
|
||||
useEffect(() => {
|
||||
data &&
|
||||
@ -119,8 +116,6 @@ export const Layer = ({
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
{/* Auto-render ItemFormPopup when popupForm matches this layer */}
|
||||
{popupForm && popupForm.layer.name === name && <ItemFormPopup />}
|
||||
</LayerContext.Provider>
|
||||
)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user