Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Fix partner earnings time series date logic (#3056)

Tim Wilsonc930a22efd32
diff --git a/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/page-client.tsx b/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/page-client.tsx
index c8234cd442..e6980f63a0 100644
--- a/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/page-client.tsx
+++ b/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/page-client.tsx
@@ -39,6 +39,7 @@ import {
import { cn, currencyFormatter, getPrettyUrl, nFormatter } from "@dub/utils";
import NumberFlow, { NumberFlowGroup } from "@number-flow/react";
import { LinearGradient } from "@visx/gradient";
+import { endOfDay, startOfDay } from "date-fns";
import { AnimatePresence, motion } from "motion/react";
import Link from "next/link";
import { useParams } from "next/navigation";
@@ -222,8 +223,8 @@ export default function ProgramPageClient() {
)}
<ProgramOverviewContext.Provider
value={{
- start: start ? new Date(start) : undefined,
- end: end ? new Date(end) : undefined,
+ start: start ? startOfDay(new Date(start)) : undefined,
+ end: end ? endOfDay(new Date(end)) : undefined,
interval,
color: program?.brandColor ?? undefined,
}}