@@ -159,13 +159,15 @@ export const ContactPolicy = InjectAppServices(
159159 const hourFromEmpty = values . timeRestriction . hourFrom === '' ;
160160 const hourToEmpty = values . timeRestriction . hourTo === '' ;
161161
162- if ( hourFromEmpty || hourToEmpty ) { // hours are empty
162+ if ( hourFromEmpty || hourToEmpty ) {
163+ // hours are empty
163164 errors . timeRestrictionHourFrom = hourFromEmpty ;
164165 errors . timeRestrictionHourTo = hourToEmpty ;
165166 errors . messageForTimeSlot = (
166167 < FormattedMessageMarkdown id = "validation_messages.error_required_field" />
167168 ) ;
168- } else { // hours are not empty
169+ } else {
170+ // hours are not empty
169171 const hourFromOutOfRange =
170172 values . timeRestriction . hourFrom < 0 || values . timeRestriction . hourFrom > 23 ;
171173 const hourToOutOfRange =
@@ -177,7 +179,8 @@ export const ContactPolicy = InjectAppServices(
177179 errors . messageForTimeSlot = (
178180 < FormattedMessageMarkdown id = "contact_policy.time_restriction.error_invalid_range_of_hours_msg" />
179181 ) ;
180- } else if ( values . timeRestriction . hourFrom === values . timeRestriction . hourTo ) { // hours are equal
182+ } else if ( values . timeRestriction . hourFrom === values . timeRestriction . hourTo ) {
183+ // hours are equal
181184 errors . timeRestrictionHourFrom = true ;
182185 errors . timeRestrictionHourTo = true ;
183186 errors . messageForTimeSlot = (
@@ -406,9 +409,7 @@ export const ContactPolicy = InjectAppServices(
406409 onToggle = { ( ) => hideMessage ( ) }
407410 />
408411
409- < p
410- className = "dp-color-gray dp-text--italic m-t-6"
411- >
412+ < p className = "dp-color-gray dp-text--italic m-t-6" >
412413 < strong className = "dp-color-red" >
413414 { _ ( 'contact_policy.time_restriction.time_slot_hint_title' ) }
414415 </ strong > { ' ' }
0 commit comments