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.

missed a few spots

Steven Teyd8307b03bdea
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/commissions/use-commission-filters.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/commissions/use-commission-filters.tsx
index b6df8002e7..3f87d84e83 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/commissions/use-commission-filters.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/commissions/use-commission-filters.tsx
@@ -35,7 +35,13 @@ export function useCommissionFilters() {
selectedFilter === "customerId" ? debouncedSearch : "",
);
- const { groups } = useGroups();
+ const { groups } = useGroups({
+ // here we're coercing page to 1 to make sure the partner table pagination doesn't mess with this
+ // TODO: standardize how we handle params in useSWR hooks – it's a bit all over the place rn
+ query: {
+ page: 1,
+ },
+ });
const filters = useMemo(
() => [
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/use-partner-filters.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/use-partner-filters.tsx
index d61173f05e..1d1452b911 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/use-partner-filters.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/use-partner-filters.tsx
@@ -11,7 +11,14 @@ import { useMemo } from "react";
export function usePartnerFilters(extraSearchParams: Record<string, string>) {
const { searchParamsObj, queryParams } = useRouterStuff();
const { id: workspaceId, slug } = useWorkspace();
- const { groups } = useGroups();
+
+ const { groups } = useGroups({
+ // here we're coercing page to 1 to make sure the partner table pagination doesn't mess with this
+ // TODO: standardize how we handle params in useSWR hooks – it's a bit all over the place rn
+ query: {
+ page: 1,
+ },
+ });
const { partnersCount: countriesCount } = usePartnersCount<
| {
diff --git a/apps/web/ui/partners/partner-details-sheet.tsx b/apps/web/ui/partners/partner-details-sheet.tsx
index 8bda2150ef..c49d7fe609 100644
--- a/apps/web/ui/partners/partner-details-sheet.tsx
+++ b/apps/web/ui/partners/partner-details-sheet.tsx
@@ -52,6 +52,9 @@ function PartnerDetailsSheetContent({ partner }: PartnerDetailsSheetProps) {
const { groups } = useGroups({
query: {
groupIds: partner.groupId ? [partner.groupId] : undefined,
+ // here we're coercing page to 1 to make sure the partner table pagination doesn't mess with this
+ // TODO: standardize how we handle params in useSWR hooks – it's a bit all over the place rn
+ page: 1,
},
});