From f78f10b63d93701f1787b2cab557ec732e8d35bc Mon Sep 17 00:00:00 2001 From: Steven Tey Date: Sat, 4 Jan 2025 19:18:16 -0800 Subject: [PATCH] Add mutatePrefix and mutateSuffix --- .../[programId]/payouts/payout-stats.tsx | 2 +- .../[slug]/settings/domains/page-client.tsx | 2 +- .../[slug]/settings/library/tags/tag-card.tsx | 14 +---- .../onboarding/(steps)/link/form.tsx | 8 +-- apps/web/lib/swr/mutate.ts | 27 ++++++++ apps/web/lib/swr/use-workspace.ts | 9 ++- apps/web/ui/domains/add-edit-domain-form.tsx | 12 +--- apps/web/ui/domains/register-domain-form.tsx | 15 ++--- apps/web/ui/layout/sidebar/usage.tsx | 2 +- apps/web/ui/links/link-controls.tsx | 9 +-- apps/web/ui/modals/accept-invite-modal.tsx | 7 +-- apps/web/ui/modals/add-edit-tag-modal.tsx | 17 +---- apps/web/ui/modals/archive-domain-modal.tsx | 14 +---- apps/web/ui/modals/archive-link-modal.tsx | 14 +---- apps/web/ui/modals/delete-domain-modal.tsx | 9 +-- apps/web/ui/modals/delete-link-modal.tsx | 9 +-- apps/web/ui/modals/import-csv-modal/index.tsx | 11 ++-- apps/web/ui/modals/link-builder/index.tsx | 21 ++----- apps/web/ui/modals/modal-provider.tsx | 8 +-- apps/web/ui/modals/transfer-domain-modal.tsx | 8 +-- apps/web/ui/modals/transfer-link-modal.tsx | 8 +-- apps/web/ui/partners/create-payout-sheet.tsx | 11 +--- .../web/ui/partners/partner-details-sheet.tsx | 20 ++---- apps/web/ui/partners/partner-row-item.tsx | 63 +++++++++++-------- apps/web/ui/partners/program-invite-card.tsx | 8 +-- apps/web/ui/partners/sale-row-menu.tsx | 12 ++-- 26 files changed, 135 insertions(+), 205 deletions(-) create mode 100644 apps/web/lib/swr/mutate.ts diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/payouts/payout-stats.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/payouts/payout-stats.tsx index d340ad2479..a9dd685196 100644 --- a/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/payouts/payout-stats.tsx +++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/payouts/payout-stats.tsx @@ -57,7 +57,7 @@ export function PayoutStats() { text="Confirm payouts" className="h-7 w-fit px-2" onClick={() => setIsOpen(true)} - disabled={confirmButtonDisabled} + disabled={eligiblePayoutsLoading || confirmButtonDisabled} disabledTooltip={ confirmButtonDisabled ? ( "You have no pending payouts that match the minimum payout requirement for partners that have payouts enabled." diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/domains/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/domains/page-client.tsx index 1795d92ebb..4d023b487e 100644 --- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/domains/page-client.tsx +++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/domains/page-client.tsx @@ -251,7 +251,7 @@ export default function WorkspaceDomainsClient() { ) ) : (