From e215b05f8b993c047ac80441eb9a507bf75fb6cd Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Fri, 10 Oct 2025 09:50:52 +0200 Subject: [PATCH] fix linting --- lib/src/Components/Item/PopupView.tsx | 2 +- lib/src/Components/Map/Subcomponents/ItemFormPopup.tsx | 2 +- .../Subcomponents/ItemPopupComponents/HeaderView/ItemAvatar.tsx | 2 +- .../Components/Profile/Subcomponents/LinkedItemsHeaderView.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/src/Components/Item/PopupView.tsx b/lib/src/Components/Item/PopupView.tsx index 7c096262..98640f38 100644 --- a/lib/src/Components/Item/PopupView.tsx +++ b/lib/src/Components/Item/PopupView.tsx @@ -173,7 +173,7 @@ export const PopupView = ({ children }: { children?: React.ReactNode }) => { - {item.name || item.layer?.item_default_name} + {item.name ?? item.layer?.item_default_name} diff --git a/lib/src/Components/Map/Subcomponents/ItemFormPopup.tsx b/lib/src/Components/Map/Subcomponents/ItemFormPopup.tsx index cbc9ee71..9e0ab2a1 100644 --- a/lib/src/Components/Map/Subcomponents/ItemFormPopup.tsx +++ b/lib/src/Components/Map/Subcomponents/ItemFormPopup.tsx @@ -146,7 +146,7 @@ export function ItemFormPopup(props: Props) { (i) => i.user_created?.id === user?.id && i.layer === popupForm.layer, ) - const itemName = formItem.name || user?.first_name + const itemName = formItem.name ?? user?.first_name if (!itemName) { toast.error('Name must be defined') return false diff --git a/lib/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView/ItemAvatar.tsx b/lib/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView/ItemAvatar.tsx index 0a364d32..e589d490 100644 --- a/lib/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView/ItemAvatar.tsx +++ b/lib/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView/ItemAvatar.tsx @@ -29,7 +29,7 @@ export function ItemAvatar({ item, big = false }: ItemAvatarProps) { {item.name setImageLoaded(true)} onError={() => setImageLoaded(false)} style={{ display: imageLoaded ? 'block' : 'none' }} diff --git a/lib/src/Components/Profile/Subcomponents/LinkedItemsHeaderView.tsx b/lib/src/Components/Profile/Subcomponents/LinkedItemsHeaderView.tsx index 29e4b9f3..491ddbeb 100644 --- a/lib/src/Components/Profile/Subcomponents/LinkedItemsHeaderView.tsx +++ b/lib/src/Components/Profile/Subcomponents/LinkedItemsHeaderView.tsx @@ -40,7 +40,7 @@ export function LinkedItemsHeaderView({ {item.name )}