fix linting

This commit is contained in:
Anton Tranelis 2025-10-10 17:12:09 +02:00
parent a9b7e5086f
commit a53ef66490
3 changed files with 16 additions and 20 deletions

View File

@ -34,7 +34,7 @@ export function ConnectionStatus({ item }: ConnectionStatusProps) {
return (
<button
style={{
backgroundColor: `${item.color ?? (getItemTags(item)[0]?.color ? getItemTags(item)[0].color : (item.layer?.markerDefaultColor ?? '#000'))}`,
backgroundColor: `${item.color ?? (getItemTags(item)[0]?.color ? getItemTags(item)[0].color : item.layer.markerDefaultColor || '#000')}`,
}}
className='tw:btn tw:text-white tw:mr-2 tw:tooltip tw:tooltip-top '
data-tip={'Connect'}

View File

@ -1,6 +1,5 @@
import { useState } from 'react'
import { QrCodeIcon } from '@heroicons/react/24/solid'
import { useState } from 'react'
import { useAppState } from '#components/AppShell/hooks/useAppState'

View File

@ -1,6 +1,5 @@
import { useRef } from 'react'
import { ShareIcon } from '@heroicons/react/24/solid'
import { useRef } from 'react'
import ChevronSVG from '#assets/chevron.svg'
import ClipboardSVG from '#assets/share/clipboard.svg'
@ -36,22 +35,20 @@ export function ShareButton({ item, dropdownDirection = 'down' }: ShareButtonPro
closeDropdown()
}
const handleNativeShare = async () => {
if (navigator.share) {
try {
await navigator.share({
title: shareTitle,
url: shareUrl,
})
closeDropdown()
} catch (error) {
// User cancelled or error occurred
console.log('Share cancelled or failed:', error)
}
}
}
const canUseNativeShare =
typeof navigator !== 'undefined' && typeof navigator.share !== 'undefined'
const canUseNativeShare = typeof navigator !== 'undefined' && navigator.share
const handleNativeShare = () => {
void navigator
.share({
title: shareTitle,
url: shareUrl,
})
.then(closeDropdown)
.catch(() => {
// User cancelled or error occurred - ignore
})
}
const platformConfigs: SharePlatformConfigs = {
facebook: {