fix linting

This commit is contained in:
Anton Tranelis 2025-10-10 09:50:52 +02:00
parent 159c459c20
commit e215b05f8b
4 changed files with 4 additions and 4 deletions

View File

@ -173,7 +173,7 @@ export const PopupView = ({ children }: { children?: React.ReactNode }) => {
</ItemViewPopup>
<Tooltip offset={[0, -38]} direction='top'>
{item.name || item.layer?.item_default_name}
{item.name ?? item.layer?.item_default_name}
</Tooltip>
</Marker>
</TemplateItemContext.Provider>

View File

@ -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

View File

@ -29,7 +29,7 @@ export function ItemAvatar({ item, big = false }: ItemAvatarProps) {
<img
className='tw:w-full tw:h-full tw:object-cover tw:rounded-full tw:border-white'
src={avatar}
alt={item.name + ' logo'}
alt={item.name ?? '' + ' logo'}
onLoad={() => setImageLoaded(true)}
onError={() => setImageLoaded(false)}
style={{ display: imageLoaded ? 'block' : 'none' }}

View File

@ -40,7 +40,7 @@ export function LinkedItemsHeaderView({
<img
className={'tw:w-10 tw:inline tw:rounded-full'}
src={avatar}
alt={item.name + ' logo'}
alt={item.name ?? '' + ' logo'}
/>
)}
<div className={`${avatar ? 'tw:ml-2' : ''} tw:overflow-hidden`}>