Skip to content

Commit

Permalink
Enhance from date to capture whole day
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptronicek committed Dec 9, 2024
1 parent 219a065 commit 980616e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/dashboard/src/Insights.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { Button } from "@podkit/buttons/Button";
export const Insights = () => {
const [prebuildsFilter, setPrebuildsFilter] = useState<"week" | "month" | "year">("week");
const [upperBound, lowerBound] = useMemo(() => {
const from = dayjs().subtract(1, prebuildsFilter);
const from = dayjs().subtract(1, prebuildsFilter).startOf("day");

const fromTimestamp = Timestamp.fromDate(from.toDate());
const toTimestamp = Timestamp.fromDate(new Date());
Expand Down Expand Up @@ -72,8 +72,8 @@ export const Insights = () => {
<SelectValue placeholder="Select time range" />
</SelectTrigger>
<SelectContent>
<SelectItem value="day">Last 24 hours</SelectItem>{" "}
{/* here for debugging, probably not useful */}
<SelectItem value="day">Last 24 hours</SelectItem>{" "}
<SelectItem value="week">Last 7 days</SelectItem>
<SelectItem value="month">Last 30 days</SelectItem>
<SelectItem value="year">Last 365 days</SelectItem>
Expand Down

0 comments on commit 980616e

Please sign in to comment.