mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-03-01 12:44:17 +00:00
fix linting
This commit is contained in:
parent
a9b7e5086f
commit
a53ef66490
@ -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'}
|
||||
|
||||
@ -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'
|
||||
|
||||
|
||||
@ -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: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user