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.

Update use-partner-filters.tsx

Kiran K83feb76bed8d
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/partners/use-partner-filters.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/partners/use-partner-filters.tsx
index 4664f95c30..59e3cadff6 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/partners/use-partner-filters.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/partners/use-partner-filters.tsx
@@ -58,16 +58,12 @@ export function usePartnerFilters(extraSearchParams: Record<string, string>) {
getOptionLabel: (value) => COUNTRIES[value],
options:
countriesCount
- ?.map(({ country, _count }) =>
- COUNTRIES[country]
- ? {
- value: country,
- label: COUNTRIES[country],
- right: nFormatter(_count, { full: true }),
- }
- : null,
- )
- .filter(Boolean) ?? [],
+ ?.filter(({ country }) => COUNTRIES[country])
+ .map(({ country, _count }) => ({
+ value: country,
+ label: COUNTRIES[country],
+ right: nFormatter(_count, { full: true }),
+ })) ?? [],
},
{
key: "rewardId",