Update lib/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView/ConnectionStatus.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Anton Tranelis 2025-10-10 20:22:59 +02:00 committed by GitHub
parent 8aed8fba5a
commit 2946074142
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,10 +31,11 @@ export function ConnectionStatus({ item }: ConnectionStatusProps) {
return <p className='tw:flex tw:items-center tw:mr-2'> Connected</p>
}
const tags = getItemTags(item);
return (
<button
style={{
backgroundColor: `${item.color ?? (getItemTags(item)[0]?.color ? getItemTags(item)[0].color : item.layer.markerDefaultColor || '#000')}`,
backgroundColor: `${item.color ?? (tags[0]?.color ? tags[0].color : item.layer.markerDefaultColor || '#000')}`,
}}
className='tw:btn tw:text-white tw:mr-2 tw:tooltip tw:tooltip-top '
data-tip={'Connect'}