Disable checkbox if not configured yet

This commit is contained in:
ekzyis 2024-07-04 21:38:54 +02:00
parent da6d262e0a
commit 39d8928772
2 changed files with 4 additions and 3 deletions

View File

@ -16,7 +16,7 @@ export function autowithdrawInitial ({ me, priority = false }) {
}
}
export function AutowithdrawSettings ({ priority }) {
export function AutowithdrawSettings ({ wallet }) {
const me = useMe()
const threshold = autoWithdrawThreshold({ me })
@ -29,6 +29,7 @@ export function AutowithdrawSettings ({ priority }) {
return (
<>
<Checkbox
disabled={!wallet.isConfigured}
label='enabled'
id='priority'
name='priority'

View File

@ -65,10 +65,10 @@ export default function WalletSettings () {
>
<WalletFields wallet={wallet} />
{wallet.server
? <AutowithdrawSettings />
? <AutowithdrawSettings wallet={wallet} />
: (
<ClientCheckbox
disabled={false}
disabled={!wallet.isConfigured}
initialValue={wallet.status === Status.Enabled}
label='enabled'
name='enabled'