File tree Expand file tree Collapse file tree
app/(ee)/partners.dub.co/(dashboard)/payouts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { hasPermission } from "@/lib/auth/partner-users/partner-user-permissions
44import usePartnerPayoutSettings from "@/lib/swr/use-partner-payout-settings" ;
55import usePartnerProfile from "@/lib/swr/use-partner-profile" ;
66import { ConnectPayoutButton } from "@/ui/partners/payouts/connect-payout-button" ;
7- import { Button } from "@dub/ui" ;
7+ import { Button , useMediaQuery } from "@dub/ui" ;
88import { usePartnerPayoutSettingsSheet } from "./partner-payout-settings-sheet" ;
99
1010export function PartnerPayoutSettingsButton ( ) {
@@ -14,6 +14,8 @@ export function PartnerPayoutSettingsButton() {
1414 const { PartnerPayoutSettingsSheet, openSettings } =
1515 usePartnerPayoutSettingsSheet ( ) ;
1616
17+ const { isMobile } = useMediaQuery ( ) ;
18+
1719 const hasConnectedPayoutMethod = payoutMethods . some ( ( m ) => m . connected ) ;
1820
1921 if ( partner && ! hasPermission ( partner . role , "payout_settings.update" ) ) {
@@ -25,12 +27,15 @@ export function PartnerPayoutSettingsButton() {
2527 < PartnerPayoutSettingsSheet />
2628
2729 { ! partner ?. payoutsEnabledAt && ! hasConnectedPayoutMethod && (
28- < ConnectPayoutButton className = "h-9 px-3" />
30+ < ConnectPayoutButton
31+ className = "h-9 px-3"
32+ text = { isMobile ? "Connect" : "Connect payout method" }
33+ />
2934 ) }
3035
3136 < Button
3237 type = "button"
33- text = " Payout settings"
38+ text = { isMobile ? "Settings" : " Payout settings"}
3439 variant = "secondary"
3540 className = "h-9 px-3"
3641 onClick = { openSettings }
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ export function ConnectPayoutButton({
7070 ? "Manage"
7171 : payoutMethod
7272 ? "Connect"
73- : "Connect payout method"
73+ : props . text || "Connect payout method"
7474 }
7575 loading = { isPending }
7676 disabledTooltip = {
You can’t perform that action at this time.
0 commit comments