Rearrange date range dropdown logically

This commit is contained in:
Daksh Shah 2020-09-05 22:10:53 +05:30
parent 83678756c7
commit 4cc75e75d4
No known key found for this signature in database
GPG key ID: F111A753041D81AD
2 changed files with 3 additions and 13 deletions

View file

@ -4,14 +4,12 @@ import {
addHours,
addDays,
addMonths,
subHours,
subDays,
startOfHour,
startOfDay,
startOfWeek,
startOfMonth,
startOfYear,
endOfHour,
endOfDay,
endOfWeek,
endOfMonth,
@ -75,13 +73,6 @@ export function getDateRange(value) {
unit,
value,
};
case 'hour':
return {
startDate: subHours(startOfHour(now), num - 1),
endDate: endOfHour(now),
unit,
value,
};
}
}