Skip to content

Commit 2ac6928

Browse files
committed
feat: Refactor LocationSpeed component to remove Animated.Text and improve styling
1 parent 8f9d241 commit 2ac6928

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/screens/LocationSpeed/LocationSpeed.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import SettWrapper from '@components/Settings/SettWrapper'
22
import { watchLocation } from '@screens/LocationNotes/lib'
33
import LocationDetails from '@screens/LocationNotes/LocationDetails'
4-
import { Bold, MEDIUM, SemiBold } from '@utils/fonts'
5-
import { layout } from '@utils/utils'
4+
import { Bold, Medium, SemiBold } from '@utils/fonts'
65
import { useEffect, useState } from 'react'
76
import { View } from 'react-native'
87
import Geolocation from 'react-native-geolocation-service'
9-
import Animated from 'react-native-reanimated'
108

119
export default function LocationSpeed() {
1210
const [pos, setPos] = useState<Geolocation.GeoPosition | null>(null)
@@ -44,14 +42,10 @@ export default function LocationSpeed() {
4442
return (
4543
<SettWrapper title='Location Speed Meter'>
4644
<View className='py-20 pb-16'>
47-
<Animated.Text
48-
className='text pl-14 text-center'
49-
style={[{ fontSize: 130, lineHeight: 130 }, MEDIUM]}
50-
layout={layout}
51-
>
45+
<Medium className='text pl-12 text-center' style={[{ fontSize: 130, lineHeight: 130 }]}>
5246
{s}
5347
<Bold style={{ fontSize: 25 }}>km/h</Bold>
54-
</Animated.Text>
48+
</Medium>
5549
<SemiBold className='text text-center text-xl'>Your Speed</SemiBold>
5650
</View>
5751
<LocationDetails data={pos} />

0 commit comments

Comments
 (0)