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.

fix bounty submission table

Steven Tey908b8a864696
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-info.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-info.tsx
index 610741a188..1006be7391 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-info.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-info.tsx
@@ -76,7 +76,7 @@ export function BountyInfo() {
<span className="font-medium text-neutral-700">
{nFormatter(bounty.partnersCount, { full: true })}
</span>{" "}
- {pluralize("partner", bounty.partnersCount ?? 0)} completed
+ {pluralize("partner", bounty.partnersCount ?? 0)} submitted
</div>
</div>
</div>
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-submissions-table.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-submissions-table.tsx
index 959d58e5d3..6be3ae719f 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-submissions-table.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-submissions-table.tsx
@@ -54,14 +54,14 @@ export function BountySubmissionsTable() {
// Decide the columns to show based on the bounty type
const showColumns = useMemo(() => {
- const columns = ["partner", "group", "createdAt"];
+ const columns = ["partner", "group", "createdAt", "status"];
if (!bounty) {
return columns;
}
if (bounty.type === "submission") {
- columns.push(...["status", "reviewedAt"]);
+ columns.push(...["reviewedAt"]);
} else if (bounty.type === "performance") {
columns.push(...["performanceMetrics"]);
}
@@ -207,11 +207,15 @@ export function BountySubmissionsTable() {
const target = performanceCondition.value;
const formattedValue = isCurrencyAttribute(attribute)
- ? currencyFormatter(value / 100)
+ ? currencyFormatter(value / 100, {
+ trailingZeroDisplay: "stripIfInteger",
+ })
: nFormatter(value, { full: true });
const formattedTarget = isCurrencyAttribute(attribute)
- ? currencyFormatter(target / 100)
+ ? currencyFormatter(target / 100, {
+ trailingZeroDisplay: "stripIfInteger",
+ })
: nFormatter(target, { full: true });
return (
@@ -307,12 +311,8 @@ export function BountySubmissionsTable() {
onPaginationChange: setPagination,
thClassName: "border-l-0",
tdClassName: "border-l-0",
- resourceName: (p) =>
- `${bounty?.type === "performance" ? "partner" : "submission"}${p ? "s" : ""}`,
- rowCount:
- bounty?.type === "performance"
- ? bounty.partnersCount
- : submissions?.length || 0,
+ resourceName: (p) => `submission${p ? "s" : ""}`,
+ rowCount: submissions?.length || 0,
loading: isLoading || isBountyLoading,
error: error ? "Failed to load bounty submissions" : undefined,
});