Disable checkbox if not configured yet
This commit is contained in:
parent
da6d262e0a
commit
39d8928772
|
@ -16,7 +16,7 @@ export function autowithdrawInitial ({ me, priority = false }) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function AutowithdrawSettings ({ priority }) {
|
export function AutowithdrawSettings ({ wallet }) {
|
||||||
const me = useMe()
|
const me = useMe()
|
||||||
const threshold = autoWithdrawThreshold({ me })
|
const threshold = autoWithdrawThreshold({ me })
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ export function AutowithdrawSettings ({ priority }) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
|
disabled={!wallet.isConfigured}
|
||||||
label='enabled'
|
label='enabled'
|
||||||
id='priority'
|
id='priority'
|
||||||
name='priority'
|
name='priority'
|
||||||
|
|
|
@ -65,10 +65,10 @@ export default function WalletSettings () {
|
||||||
>
|
>
|
||||||
<WalletFields wallet={wallet} />
|
<WalletFields wallet={wallet} />
|
||||||
{wallet.server
|
{wallet.server
|
||||||
? <AutowithdrawSettings />
|
? <AutowithdrawSettings wallet={wallet} />
|
||||||
: (
|
: (
|
||||||
<ClientCheckbox
|
<ClientCheckbox
|
||||||
disabled={false}
|
disabled={!wallet.isConfigured}
|
||||||
initialValue={wallet.status === Status.Enabled}
|
initialValue={wallet.status === Status.Enabled}
|
||||||
label='enabled'
|
label='enabled'
|
||||||
name='enabled'
|
name='enabled'
|
||||||
|
|
Loading…
Reference in New Issue