fix(source): fix bug in ItemFormPopup (#191)

* fix bug in ItemFormPopup

* removed logging

* removed more logging
This commit is contained in:
Anton Tranelis 2025-03-19 23:07:43 +00:00 committed by GitHub
parent 0595e54a9b
commit 8b7cff2b32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -83,18 +83,13 @@ export function ItemFormPopup(props: ItemFormPopupProps) {
toast.error(error.toString())
}
if (success) {
// eslint-disable-next-line no-console
console.log(props.item)
updateItem({ ...props.item, ...formItem })
toast.success('Item updated')
}
setSpinner(false)
map.closePopup()
} else {
const item = items.find(
(i) => i.user_created?.id === user?.id && i.layer?.id === props.layer.id,
)
const item = items.find((i) => i.user_created?.id === user?.id && i.layer === props.layer)
const uuid = crypto.randomUUID()
let success = false