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
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>
|
||||
}
|
||||
|
||||
const tags = getItemTags(item);
|
||||
const tags = getItemTags(item)
|
||||
return (
|
||||
<button
|
||||
style={{
|
||||
|
||||
@ -44,7 +44,11 @@ export const useGeoDistance = (targetPoint?: Point) => {
|
||||
const dist = getDistance(userLat, userLon, targetLat, targetLon)
|
||||
setDistance(dist)
|
||||
} catch (err) {
|
||||
setError('Calculation error')
|
||||
if (err instanceof Error) {
|
||||
setError(err.message)
|
||||
} else {
|
||||
setError('Calculation error')
|
||||
}
|
||||
}
|
||||
}, [myProfile, isMyProfileLoaded, targetPoint])
|
||||
|
||||
|
||||
@ -90,8 +90,11 @@ export function useReverseGeocode(
|
||||
setAddress('')
|
||||
}
|
||||
} catch (err) {
|
||||
const errorMessage = err instanceof Error ? err.message : 'Unknown error occurred'
|
||||
setError(errorMessage)
|
||||
if (err instanceof Error) {
|
||||
setError(err.message)
|
||||
} else {
|
||||
setError('Unknown error occurred')
|
||||
}
|
||||
setAddress('')
|
||||
} finally {
|
||||
setLoading(false)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user