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.

small fixes here and there

Steven Tey871a6b813865
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/sales/sale-table.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/sales/sale-table.tsx
index a4952af219..5af79d11a4 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/sales/sale-table.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/sales/sale-table.tsx
@@ -255,7 +255,15 @@ export function SaleTableBusiness({ limit }: { limit?: number }) {
{activeFilters.length > 0 && (
<div className="pt-3">
<Filter.List
- filters={filters}
+ filters={[
+ ...filters,
+ {
+ key: "payoutId",
+ icon: MoneyBill2,
+ label: "Payout",
+ options: [],
+ },
+ ]}
activeFilters={activeFilters}
onRemove={onRemove}
onRemoveAll={onRemoveAll}
diff --git a/apps/web/app/partners.dub.co/(dashboard)/[partnerId]/settings/payouts/page-client.tsx b/apps/web/app/partners.dub.co/(dashboard)/[partnerId]/settings/payouts/page-client.tsx
index 260ad6e05c..668768e0d4 100644
--- a/apps/web/app/partners.dub.co/(dashboard)/[partnerId]/settings/payouts/page-client.tsx
+++ b/apps/web/app/partners.dub.co/(dashboard)/[partnerId]/settings/payouts/page-client.tsx
@@ -9,6 +9,7 @@ import { AnimatedEmptyState } from "@/ui/shared/animated-empty-state";
import { CheckCircleFill, X } from "@/ui/shared/icons";
import { Button, Modal, Note } from "@dub/ui";
import { GiftFill, GreekTemple, MobilePhone } from "@dub/ui/src/icons";
+import { SimpleTooltipContent, Tooltip } from "@dub/ui/src/tooltip";
import {
cn,
currencyFormatter,
@@ -261,37 +262,47 @@ function FreeWithdrawalProgress({ balance }: { balance: number }) {
const isFree = balance >= FREE_WITHDRAWAL_MINIMUM_BALANCE;
return (
- <div className="flex flex-col gap-1.5">
- <div className="text-2xs text-neutral-500 lg:whitespace-nowrap">
- {isFree ? (
- <p className="flex items-center gap-0.5 sm:pr-8">
- <GiftFill className="mr-px inline-block size-2.5 text-green-900" />
- Free withdrawal unlocked
- </p>
- ) : (
- <>
- You're{" "}
- {currencyFormatter(remaining / 100, {
- minimumFractionDigits: 2,
- maximumFractionDigits: 2,
- })}{" "}
- away from a free withdrawal
- </>
- )}
- </div>
- <div className="h-0.5 w-full overflow-hidden rounded-full bg-neutral-200">
- <div
- className={cn(
- "h-full rounded-full",
- isFree ? "bg-green-500" : "bg-neutral-900",
- )}
- style={{
- width: isFree
- ? "100%"
- : `${(balance / FREE_WITHDRAWAL_MINIMUM_BALANCE) * 100}%`,
- }}
+ <Tooltip
+ content={
+ <SimpleTooltipContent
+ title="Withdrawals above $1,000 in the US are free."
+ cta="Learn more"
+ href="/help" // TODO: [payouts] Add help page
/>
+ }
+ >
+ <div className="flex flex-col gap-1.5">
+ <div className="text-2xs text-neutral-500 lg:whitespace-nowrap">
+ {isFree ? (
+ <p className="flex items-center gap-0.5 sm:pr-8">
+ <GiftFill className="mr-px inline-block size-2.5 text-green-900" />
+ Free withdrawal unlocked
+ </p>
+ ) : (
+ <>
+ You're{" "}
+ {currencyFormatter(remaining / 100, {
+ minimumFractionDigits: 2,
+ maximumFractionDigits: 2,
+ })}{" "}
+ away from a free withdrawal
+ </>
+ )}
+ </div>
+ <div className="h-0.5 w-full overflow-hidden rounded-full bg-neutral-200">
+ <div
+ className={cn(
+ "h-full rounded-full",
+ isFree ? "bg-green-500" : "bg-neutral-900",
+ )}
+ style={{
+ width: isFree
+ ? "100%"
+ : `${(balance / FREE_WITHDRAWAL_MINIMUM_BALANCE) * 100}%`,
+ }}
+ />
+ </div>
</div>
- </div>
+ </Tooltip>
);
}
diff --git a/apps/web/ui/partners/payout-details-sheet.tsx b/apps/web/ui/partners/payout-details-sheet.tsx
index 0bec179b18..402056b114 100644
--- a/apps/web/ui/partners/payout-details-sheet.tsx
+++ b/apps/web/ui/partners/payout-details-sheet.tsx
@@ -79,6 +79,14 @@ function PayoutDetailsSheetContent({
minimumFractionDigits: 2,
maximumFractionDigits: 2,
}),
+ Fee: currencyFormatter(payout.fee / 100, {
+ minimumFractionDigits: 2,
+ maximumFractionDigits: 2,
+ }),
+ Total: currencyFormatter(payout.total / 100, {
+ minimumFractionDigits: 2,
+ maximumFractionDigits: 2,
+ }),
Status: (
<StatusBadge variant={statusBadge.variant} icon={statusBadge.icon}>
{statusBadge.label}