@@ -36,9 +36,10 @@ export function ClimatePresets(props: ClimatePresetsManagement): JSX.Element {
3636 ThermostatClimatePreset | typeof CreateNewPresetSymbol | null
3737 > ( null )
3838
39- const [ climatePresetKeySelectedForDeletion , setClimatePresetKeySelectedForDeletion ] = useState <
40- ThermostatClimatePreset [ 'climate_preset_key' ] | null
41- > ( null )
39+ const [
40+ climatePresetKeySelectedForDeletion ,
41+ setClimatePresetKeySelectedForDeletion ,
42+ ] = useState < ThermostatClimatePreset [ 'climate_preset_key' ] | null > ( null )
4243 const deleteMutation = useDeleteThermostatClimatePreset ( )
4344
4445 if (
@@ -81,7 +82,9 @@ export function ClimatePresets(props: ClimatePresetsManagement): JSX.Element {
8182 setSelectedClimatePreset ( preset )
8283 } }
8384 onClickDelete = { ( ) => {
84- setClimatePresetKeySelectedForDeletion ( preset . climate_preset_key )
85+ setClimatePresetKeySelectedForDeletion (
86+ preset . climate_preset_key
87+ )
8588 deleteMutation . mutate ( {
8689 climate_preset_key : preset . climate_preset_key ,
8790 device_id : device . device_id ,
@@ -92,11 +95,13 @@ export function ClimatePresets(props: ClimatePresetsManagement): JSX.Element {
9295 key = { preset . climate_preset_key }
9396 deletionLoading = {
9497 deleteMutation . isPending &&
95- climatePresetKeySelectedForDeletion === preset . climate_preset_key
98+ climatePresetKeySelectedForDeletion ===
99+ preset . climate_preset_key
96100 }
97101 disabled = {
98102 deleteMutation . isPending &&
99- climatePresetKeySelectedForDeletion !== preset . climate_preset_key
103+ climatePresetKeySelectedForDeletion !==
104+ preset . climate_preset_key
100105 }
101106 />
102107 ) ) }
@@ -192,23 +197,28 @@ function PresetCard(
192197
193198 < div className = 'seam-thermostat-climate-presets-card-body' >
194199 { heatPoint != null && (
195- < Chip icon = { < ThermostatHeatIcon /> } text = { `${ heatPoint } ${ unitSymbol } ` } />
200+ < Chip
201+ icon = { < ThermostatHeatIcon /> }
202+ text = { `${ heatPoint } ${ unitSymbol } ` }
203+ />
196204 ) }
197205
198206 { coolPoint != null && (
199- < Chip icon = { < ThermostatCoolIcon /> } text = { `${ coolPoint } ${ unitSymbol } ` } />
207+ < Chip
208+ icon = { < ThermostatCoolIcon /> }
209+ text = { `${ coolPoint } ${ unitSymbol } ` }
210+ />
200211 ) }
201212
202213 { preset . fan_mode_setting != null && (
203- < Chip icon = { < FanIcon /> } text = { preset . fan_mode_setting } />
204- ) }
214+ < Chip icon = { < FanIcon /> } text = { preset . fan_mode_setting } />
215+ ) }
205216 </ div >
206217 </ div >
207218 )
208219}
209220
210-
211- function Chip ( { icon, text } : { icon : ReactNode , text : string } ) : JSX . Element {
221+ function Chip ( { icon, text } : { icon : ReactNode ; text : string } ) : JSX . Element {
212222 return (
213223 < div className = 'seam-thermostat-climate-preset-chip' >
214224 < span className = 'seam-thermostat-climate-preset-chip-icon' > { icon } </ span >
0 commit comments