@@ -87,43 +87,46 @@ export default function NewCoordinateNotes({ navigation }: NavProp) {
87
87
function LocationDetails ( { data } : { data : GeoPosition | undefined } ) {
88
88
console . log ( data ?. coords . latitude )
89
89
const { coords : { latitude, longitude, accuracy, altitude, altitudeAccuracy, speed } = { } , timestamp } = data || { }
90
+
91
+ console . log ( latitude , longitude , accuracy , altitude , altitudeAccuracy , speed , timestamp )
92
+
90
93
return (
91
94
< >
92
95
< Gap12 >
93
96
< SettGroup title = 'Location Details' >
94
97
< SettOption
95
98
title = 'Latitude'
96
99
Icon = { < RoundedIcon Icon = { LongitudeIcon } className = 'bg-blue-500' /> }
97
- Right = { < Txt skeleton = { latitude } > { getLatitude ( latitude || 0 ) } </ Txt > }
100
+ Right = { < Txt skeleton = { latitude === undefined } > { getLatitude ( latitude || 0 ) } </ Txt > }
98
101
/>
99
102
< SettOption
100
103
title = 'Longitude'
101
104
Icon = { < RoundedIcon Icon = { LatitudeIcon } className = 'bg-green-500' /> }
102
- Right = { < Txt skeleton = { longitude } > { getLongitude ( longitude || 0 ) } </ Txt > }
105
+ Right = { < Txt skeleton = { longitude === undefined } > { getLongitude ( longitude || 0 ) } </ Txt > }
103
106
/>
104
107
< SettOption
105
108
title = 'Accuracy'
106
109
Icon = { < RoundedIcon Icon = { DashboardSpeed02Icon } className = 'bg-rose-500' /> }
107
- Right = { < Txt skeleton = { accuracy } > { accuracy ?. toFixed ( 0 ) } m</ Txt > }
110
+ Right = { < Txt skeleton = { accuracy === undefined } > { accuracy ?. toFixed ( 0 ) } m</ Txt > }
108
111
/>
109
112
< SettOption
110
113
title = 'Altitude'
111
114
Icon = { < RoundedIcon Icon = { EarthIcon } className = 'bg-blue-500' /> }
112
115
Right = {
113
- < Txt skeleton = { altitude } >
116
+ < Txt skeleton = { altitude === undefined } >
114
117
{ altitude ?. toFixed ( 0 ) } m ± { altitudeAccuracy ?. toFixed ( 0 ) } m
115
118
</ Txt >
116
119
}
117
120
/>
118
121
< SettOption
119
122
title = 'Speed'
120
123
Icon = { < RoundedIcon Icon = { Rocket01Icon } className = 'bg-orange-500' /> }
121
- Right = { < Txt skeleton = { speed } > { speed ?. toFixed ( 0 ) } m/s</ Txt > }
124
+ Right = { < Txt skeleton = { speed === undefined } > { speed ?. toFixed ( 0 ) } m/s</ Txt > }
122
125
/>
123
126
< SettOption
124
127
title = 'Timestamp'
125
128
Icon = { < RoundedIcon Icon = { Timer02Icon } className = 'bg-accent' /> }
126
- Right = { < Txt skeleton = { timestamp } > { new Date ( timestamp || 0 ) . toLocaleString ( ) } </ Txt > }
129
+ Right = { < Txt skeleton = { timestamp === undefined } > { new Date ( timestamp || 0 ) . toLocaleString ( ) } </ Txt > }
127
130
/>
128
131
</ SettGroup >
129
132
</ Gap12 >
0 commit comments