Skip to content

Commit ffd50e2

Browse files
committed
chore: code formatting & type added in date time picker
1 parent 4cf6c3b commit ffd50e2

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

src/components/app/details/appDetails/SourceInfo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ export const SourceInfo = ({
299299
ariaLabel="Go to Environment Configuration"
300300
showTooltip
301301
tooltipProps={{
302-
content: "Go to Environment Config",
302+
content: 'Go to Environment Config',
303303
placement: 'bottom',
304304
}}
305305
/>

src/components/common/DatePickers/DayPickerRangeController.tsx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import React, { Component } from 'react'
17+
import { Component } from 'react'
1818
import 'react-dates/initialize'
1919
import 'react-dates/lib/css/_datepicker.css'
2020
import CustomizableCalendarDay from 'react-dates/esm/components/CustomizableCalendarDay.js'
@@ -133,10 +133,10 @@ export class DatePickerType2 extends Component<DatePickerType2Props, any> {
133133
ReactGA.event(DA_APP_DETAILS_GA_EVENTS.MetricsApplyTimeChange)
134134
}
135135

136-
onClickPredefinedTimeRange = (startDate, endDate, endStr) => () => {
137-
ReactGA.event(DA_APP_DETAILS_GA_EVENTS.MetricsPresetTimeRange)
138-
this.props.handlePredefinedRange(startDate, endDate, endStr)
139-
this.setState({ showCalendar: false })
136+
onClickPredefinedTimeRange = (startDate: Moment, endDate: Moment, endStr: string) => () => {
137+
ReactGA.event(DA_APP_DETAILS_GA_EVENTS.MetricsPresetTimeRange)
138+
this.props.handlePredefinedRange(startDate, endDate, endStr)
139+
this.setState({ showCalendar: false })
140140
}
141141

142142
renderDatePresets() {
@@ -181,11 +181,7 @@ export class DatePickerType2 extends Component<DatePickerType2Props, any> {
181181
}}
182182
/>
183183
</label>
184-
<button
185-
type="button"
186-
className="cta small"
187-
onClick={this.onClickApplyTimeChange}
188-
>
184+
<button type="button" className="cta small" onClick={this.onClickApplyTimeChange}>
189185
Apply Time Range
190186
</button>
191187
</div>

0 commit comments

Comments
 (0)