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-bounty-submission-filters.tsx

Steven Teybe2ba2f1a0da
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/use-bounty-submission-filters.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/use-bounty-submission-filters.tsx
index edf272c2bf..086b547277 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/use-bounty-submission-filters.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/use-bounty-submission-filters.tsx
@@ -27,6 +27,26 @@ export function useBountySubmissionFilters({
const filters = useMemo(
() => [
+ {
+ key: "groupId",
+ icon: Users6,
+ label: "Group",
+ options:
+ groups // only show groups that are associated with the bounty
+ ?.filter((group) =>
+ bounty?.groups && bounty?.groups.length > 0
+ ? bounty?.groups.map((g) => g.id).includes(group.id)
+ : true,
+ )
+ .map((group) => {
+ return {
+ value: group.id,
+ label: group.name,
+ icon: <GroupColorCircle group={group} />,
+ permalink: `/${slug}/program/groups/${group.slug}/rewards`,
+ };
+ }) ?? null,
+ },
{
key: "status",
icon: CircleDotted,
@@ -55,28 +75,8 @@ export function useBountySubmissionFilters({
})
: null,
},
- {
- key: "groupId",
- icon: Users6,
- label: "Partner Group",
- options:
- groups // only show groups that are associated with the bounty
- ?.filter((group) =>
- bounty?.groups && bounty?.groups.length > 0
- ? bounty?.groups.map((g) => g.id).includes(group.id)
- : true,
- )
- .map((group) => {
- return {
- value: group.id,
- label: group.name,
- icon: <GroupColorCircle group={group} />,
- permalink: `/${slug}/program/groups/${group.slug}/rewards`,
- };
- }) ?? null,
- },
],
- [bounty, submissionsCount, groups, slug],
+ [groups, bounty, submissionsCount, slug],
);
const activeFilters = useMemo(() => {