diff --git a/src/Components/Map/Subcomponents/ItemFormPopup.tsx b/src/Components/Map/Subcomponents/ItemFormPopup.tsx index 45a95ebc..cdc9e498 100644 --- a/src/Components/Map/Subcomponents/ItemFormPopup.tsx +++ b/src/Components/Map/Subcomponents/ItemFormPopup.tsx @@ -105,8 +105,8 @@ export function ItemFormPopup(props: ItemFormPopupProps) { toast.error(error.toString()) } if (success) { - props.layer.onlyOnePerOwner && item && updateItem({ ...item, ...formItem }) - ;(!props.layer.onlyOnePerOwner || !item) && + if (props.layer.onlyOnePerOwner && item) updateItem({ ...item, ...formItem }) + if (!props.layer.onlyOnePerOwner || !item) { addItem({ ...formItem, name: formItem.name ? formItem.name : user?.first_name, @@ -116,6 +116,7 @@ export function ItemFormPopup(props: ItemFormPopupProps) { layer: props.layer, public_edit: !user, }) + } toast.success('New item created') resetFilterTags() } diff --git a/src/Components/Profile/Subcomponents/GroupSubHeaderView.tsx b/src/Components/Profile/Subcomponents/GroupSubHeaderView.tsx index b3f919c9..5246fe03 100644 --- a/src/Components/Profile/Subcomponents/GroupSubHeaderView.tsx +++ b/src/Components/Profile/Subcomponents/GroupSubHeaderView.tsx @@ -26,7 +26,14 @@ export const GroupSubHeaderView = ({ )}