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.

updates

Kiran K5562d6fac2db
diff --git a/apps/web/app/api/links/export/route.ts b/apps/web/app/api/links/export/route.ts
index cbb369b14d..9ef1b7ca85 100644
--- a/apps/web/app/api/links/export/route.ts
+++ b/apps/web/app/api/links/export/route.ts
@@ -81,6 +81,8 @@ export const GET = withWorkspace(
}),
...(userId && { userId }),
},
+
+ // TODO: orderBy is not currently supported
orderBy: {
[sort]: "desc",
},
diff --git a/apps/web/ui/modals/export-links-modal.tsx b/apps/web/ui/modals/export-links-modal.tsx
index af90573a3f..6461f6df05 100644
--- a/apps/web/ui/modals/export-links-modal.tsx
+++ b/apps/web/ui/modals/export-links-modal.tsx
@@ -55,7 +55,6 @@ function ExportLinksModal({
const { getQueryString } = useRouterStuff();
const dateRangePickerId = useId();
const columnCheckboxId = useId();
- const useFiltersCheckboxId = useId();
const {
control,
@@ -88,11 +87,13 @@ function ExportLinksModal({
",",
),
};
+
const queryString = data.useFilters
? getQueryString(params, {
ignore: ["import", "upgrade", "newLink"],
})
: "?" + new URLSearchParams(params).toString();
+
const response = await fetch(`/api/links/export${queryString}`, {
method: "GET",
headers: {