Skip to content

Commit

Permalink
Remove obsolete custom types from super date picker handlers. (#69038) (
Browse files Browse the repository at this point in the history
#69271)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
justinkambic and elasticmachine authored Jun 29, 2020
1 parent cff0428 commit f0b7d5d
Showing 1 changed file with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,6 @@ import { useUrlParams } from '../../hooks';
import { CLIENT_DEFAULTS } from '../../../common/constants';
import { UptimeRefreshContext, UptimeSettingsContext } from '../../contexts';

// TODO: when EUI exports types for this, this should be replaced
interface SuperDateRangePickerRangeChangedEvent {
start: string;
end: string;
}

interface SuperDateRangePickerRefreshChangedEvent {
isPaused: boolean;
refreshInterval?: number;
}

export interface CommonlyUsedRange {
from: string;
to: string;
Expand Down Expand Up @@ -52,12 +41,12 @@ export const UptimeDatePicker = () => {
commonlyUsedRanges={euiCommonlyUsedRanges}
isPaused={autorefreshIsPaused}
refreshInterval={autorefreshInterval}
onTimeChange={({ start, end }: SuperDateRangePickerRangeChangedEvent) => {
onTimeChange={({ start, end }) => {
updateUrl({ dateRangeStart: start, dateRangeEnd: end });
refreshApp();
}}
onRefresh={refreshApp}
onRefreshChange={({ isPaused, refreshInterval }: SuperDateRangePickerRefreshChangedEvent) => {
onRefreshChange={({ isPaused, refreshInterval }) => {
updateUrl({
autorefreshInterval:
refreshInterval === undefined ? autorefreshInterval : refreshInterval,
Expand Down

0 comments on commit f0b7d5d

Please sign in to comment.