Skip to content

Commit 980616e

Browse files
committed
Enhance from date to capture whole day
1 parent 219a065 commit 980616e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/dashboard/src/Insights.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { Button } from "@podkit/buttons/Button";
3232
export const Insights = () => {
3333
const [prebuildsFilter, setPrebuildsFilter] = useState<"week" | "month" | "year">("week");
3434
const [upperBound, lowerBound] = useMemo(() => {
35-
const from = dayjs().subtract(1, prebuildsFilter);
35+
const from = dayjs().subtract(1, prebuildsFilter).startOf("day");
3636

3737
const fromTimestamp = Timestamp.fromDate(from.toDate());
3838
const toTimestamp = Timestamp.fromDate(new Date());
@@ -72,8 +72,8 @@ export const Insights = () => {
7272
<SelectValue placeholder="Select time range" />
7373
</SelectTrigger>
7474
<SelectContent>
75-
<SelectItem value="day">Last 24 hours</SelectItem>{" "}
7675
{/* here for debugging, probably not useful */}
76+
<SelectItem value="day">Last 24 hours</SelectItem>{" "}
7777
<SelectItem value="week">Last 7 days</SelectItem>
7878
<SelectItem value="month">Last 30 days</SelectItem>
7979
<SelectItem value="year">Last 365 days</SelectItem>

0 commit comments

Comments
 (0)