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.

pass timezone to commission endpoints

Steven Tey4d2b733bdca9
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/commissions/commission-table.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/commissions/commission-table.tsx
index e74ea3cd91..19ec1ff7e6 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/commissions/commission-table.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/commissions/commission-table.tsx
@@ -94,6 +94,7 @@ export function CommissionTable() {
} = useSWR<CommissionResponse[]>(
`/api/commissions${getQueryString({
workspaceId,
+ timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
})}`,
fetcher,
{
diff --git a/apps/web/lib/swr/use-commissions-count.ts b/apps/web/lib/swr/use-commissions-count.ts
index 438d6dabf0..eb02c87f09 100644
--- a/apps/web/lib/swr/use-commissions-count.ts
+++ b/apps/web/lib/swr/use-commissions-count.ts
@@ -12,6 +12,7 @@ export default function useCommissionsCount(opts?: Record<string, any>) {
`/api/commissions/count${getQueryString(
{
workspaceId,
+ timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
},
{
...opts,