Skip to content

Commit 06e7012

Browse files
authored
fix: if insights start and end is the same, then set the range to tha… (#6594)
1 parent 8c54568 commit 06e7012

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/big-cars-tie.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'hive': patch
3+
---
4+
5+
Fix insights range if selecting same start and end

packages/web/app/src/lib/hooks/use-date-range-controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export function useDateRangeController(args: {
6060
let to = new Date(parsed.to);
6161

6262
if (from.getTime() === to.getTime()) {
63-
to = subSeconds(addHours(new Date(), 20), 1);
63+
to = subSeconds(addHours(to, 24), 1);
6464
}
6565

6666
const resolved = resolveRangeAndResolution({

0 commit comments

Comments
 (0)