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 disabledtooltip

Steven Tey99285ff1daa1
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/payouts/bank-account.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/payouts/bank-account.tsx
index f1f9a1ac64..0bd10dd3d9 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/payouts/bank-account.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/payouts/bank-account.tsx
@@ -2,6 +2,7 @@
import useWorkspace from "@/lib/swr/use-workspace";
import { StatusBadge, Tooltip } from "@dub/ui";
+import { SimpleTooltipContent } from "@dub/ui/src/tooltip";
import { Fragment } from "react";
export const BankAccount = () => {
@@ -23,19 +24,15 @@ export const BankAccount = () => {
<Tooltip
align="end"
content={
- <div className="px-3 py-2 text-sm text-neutral-600">
- To complete verification,{" "}
- <a
- href={
- `mailto:[email protected]?subject=Verifying payouts bank account` +
- `&body=I am verifying bank account ownership for my workspace "${slug}".` +
- ` I have attached a copy of my recent bank statement to this email.`
- }
- className="underline transition-colors duration-75 hover:text-neutral-900"
- >
- contact support
- </a>{" "}
- </div>
+ <SimpleTooltipContent
+ title="To complete verification, "
+ cta="contact support."
+ href={
+ `mailto:[email protected]?subject=Verifying payouts bank account` +
+ `&body=I am verifying bank account ownership for my workspace "${slug}".` +
+ ` I have attached a copy of my recent bank statement to this email.`
+ }
+ />
}
>
<div>
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/payouts/wallet.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/payouts/wallet.tsx
index ebe4550192..359c9a3e70 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/payouts/wallet.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/payouts/wallet.tsx
@@ -4,10 +4,11 @@ import useDotsApp from "@/lib/swr/use-dots-app";
import useWorkspace from "@/lib/swr/use-workspace";
import { useDepositFundsModal } from "@/ui/modals/deposit-funds-modal";
import { Button } from "@dub/ui";
+import { SimpleTooltipContent } from "@dub/ui/src/tooltip";
import { currencyFormatter } from "@dub/utils";
export const Wallet = () => {
- const { bankAccountVerified } = useWorkspace();
+ const { slug, bankAccountVerified } = useWorkspace();
const { data, error } = useDotsApp();
const loading = !data && !error;
@@ -30,7 +31,19 @@ export const Wallet = () => {
text="Deposit funds"
onClick={() => setShowDepositFundsModal(true)}
className="h-7 w-fit px-2"
- disabled={!bankAccountVerified}
+ disabledTooltip={
+ !bankAccountVerified ? (
+ <SimpleTooltipContent
+ title="You can only deposit funds once your bank account is verified."
+ cta="Contact support."
+ href={
+ `mailto:[email protected]?subject=Verifying payouts bank account` +
+ `&body=I am verifying bank account ownership for my workspace "${slug}".` +
+ ` I have attached a copy of my recent bank statement to this email.`
+ }
+ />
+ ) : undefined
+ }
/>
) : (
<div className="h-7 w-24 animate-pulse rounded-md bg-neutral-200" />