mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-04-06 01:25:33 +00:00
fix linting
This commit is contained in:
parent
2946074142
commit
1147673fad
@ -31,7 +31,7 @@ export function ConnectionStatus({ item }: ConnectionStatusProps) {
|
|||||||
return <p className='tw:flex tw:items-center tw:mr-2'>✅ Connected</p>
|
return <p className='tw:flex tw:items-center tw:mr-2'>✅ Connected</p>
|
||||||
}
|
}
|
||||||
|
|
||||||
const tags = getItemTags(item);
|
const tags = getItemTags(item)
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
@ -44,7 +44,11 @@ export const useGeoDistance = (targetPoint?: Point) => {
|
|||||||
const dist = getDistance(userLat, userLon, targetLat, targetLon)
|
const dist = getDistance(userLat, userLon, targetLat, targetLon)
|
||||||
setDistance(dist)
|
setDistance(dist)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
setError('Calculation error')
|
if (err instanceof Error) {
|
||||||
|
setError(err.message)
|
||||||
|
} else {
|
||||||
|
setError('Calculation error')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, [myProfile, isMyProfileLoaded, targetPoint])
|
}, [myProfile, isMyProfileLoaded, targetPoint])
|
||||||
|
|
||||||
|
|||||||
@ -90,8 +90,11 @@ export function useReverseGeocode(
|
|||||||
setAddress('')
|
setAddress('')
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
const errorMessage = err instanceof Error ? err.message : 'Unknown error occurred'
|
if (err instanceof Error) {
|
||||||
setError(errorMessage)
|
setError(err.message)
|
||||||
|
} else {
|
||||||
|
setError('Unknown error occurred')
|
||||||
|
}
|
||||||
setAddress('')
|
setAddress('')
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false)
|
setLoading(false)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user