mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
fix(source): fix bug in ItemFormPopup (#191)
* fix bug in ItemFormPopup * removed logging * removed more logging
This commit is contained in:
parent
0595e54a9b
commit
8b7cff2b32
@ -83,18 +83,13 @@ export function ItemFormPopup(props: ItemFormPopupProps) {
|
|||||||
toast.error(error.toString())
|
toast.error(error.toString())
|
||||||
}
|
}
|
||||||
if (success) {
|
if (success) {
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.log(props.item)
|
|
||||||
|
|
||||||
updateItem({ ...props.item, ...formItem })
|
updateItem({ ...props.item, ...formItem })
|
||||||
toast.success('Item updated')
|
toast.success('Item updated')
|
||||||
}
|
}
|
||||||
setSpinner(false)
|
setSpinner(false)
|
||||||
map.closePopup()
|
map.closePopup()
|
||||||
} else {
|
} else {
|
||||||
const item = items.find(
|
const item = items.find((i) => i.user_created?.id === user?.id && i.layer === props.layer)
|
||||||
(i) => i.user_created?.id === user?.id && i.layer?.id === props.layer.id,
|
|
||||||
)
|
|
||||||
|
|
||||||
const uuid = crypto.randomUUID()
|
const uuid = crypto.randomUUID()
|
||||||
let success = false
|
let success = false
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user