@@ -15,13 +15,17 @@ import { Icons } from '../utils'
1515
1616const WeatherWidget = React . memo < { navigation : StackNav } > ( ( { navigation } ) => {
1717 const weatherWidgetIsActive = weatherStore ( ( state ) => state . weatherWidgetIsActive )
18- const currentCity = weatherStore ( ( state ) => state . currentCity )
19- const currentUnit = weatherStore ( ( state ) => state . temperatureUnit )
20- const lastUpdated = weatherStore ( ( state ) => state . lastUpdated )
21- const currentWeather = weatherStore ( ( state ) => state . currentWeather )
22- const setCurrentWeather = weatherStore ( ( state ) => state . setCurrentWeather )
23- const setLastUpdated = weatherStore ( ( state ) => state . setLastUpdated )
24- const weatherCacheTime = weatherStore ( ( state ) => state . weatherCacheTime )
18+ const { currentCity, currentUnit, lastUpdated, currentWeather, setCurrentWeather, setLastUpdated, weatherCacheTime } =
19+ weatherStore ( ( state ) => ( {
20+ currentCity : state . currentCity ,
21+ currentUnit : state . temperatureUnit ,
22+ lastUpdated : state . lastUpdated ,
23+ currentWeather : state . currentWeather ,
24+ setCurrentWeather : state . setCurrentWeather ,
25+ setLastUpdated : state . setLastUpdated ,
26+ weatherCacheTime : state . weatherCacheTime ,
27+ } ) )
28+
2529 const height = hw . height
2630 const width = hw . width
2731
@@ -90,26 +94,26 @@ const WeatherWidget = React.memo<{ navigation: StackNav }>(({ navigation }) => {
9094 >
9195 < View >
9296 < View className = 'flex-row justify-between' >
93- < Medium className = 'text-base ' style = { color } >
97+ < Medium className = 'text-sm ' style = { color } >
9498 { currentCity . name }
9599 </ Medium >
96100 { isPending && < ActivityIndicator size = { 15 } color = { color . color } /> }
97101 </ View >
98- < Regular style = { [ { fontSize : 50 , lineHeight : 70 } , color ] } >
102+ < Regular style = { [ { fontSize : 45 , lineHeight : 65 } , color ] } >
99103 { w ? tempConverter ( { temp : w . current . temp , unit : currentUnit } ) : '__' }
100104 { currentUnit === 'K' ? '' : '°' }
101105 </ Regular >
102106 </ View >
103107 < View >
104108 < Icon width = { 25 } height = { 25 } color = { color . color } />
105- < Medium style = { [ color ] } className = 'mt-0.5 capitalize' >
109+ < Medium style = { [ color ] } className = 'mt-0.5 text-xs capitalize' >
106110 { w ? w . current . weather [ 0 ] ! . description : '__' }
107111 { /* {w.current.weather[0].icon} */ }
108112 </ Medium >
109113 { /* <Medium style={[color]}>
110114 H:{w ? tempConverter(w.daily[0].temp.max, currentUnit) : '__'}° L: {w ? tempConverter(w.daily[0].temp.min, currentUnit) : '__'}°
111115 </Medium> */ }
112- < Medium style = { [ color ] } >
116+ < Medium style = { [ color ] } className = 'text-xs' >
113117 { w ? tempConverter ( { temp : w . daily [ 0 ] ! . temp . min , unit : currentUnit } ) : '__' }
114118 { currentUnit === 'K' ? currentUnit : '° ' + currentUnit } /{ ' ' }
115119 { w ? tempConverter ( { temp : w . daily [ 0 ] ! . temp . max , unit : currentUnit } ) : '__' }
@@ -142,7 +146,7 @@ const WeatherWithText = React.memo<{ text: string; onPress?: () => void; theme:
142146 activeOpacity = { 0.7 }
143147 onPress = { onPress }
144148 >
145- < Medium style = { color } className = 'text-center' >
149+ < Medium style = { color } className = 'text-center text-xs ' >
146150 { text }
147151 </ Medium >
148152 </ TouchableOpacity >
0 commit comments