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 threshold = autoWithdrawThreshold({ me })
|
||||
|
||||
|
@ -29,6 +29,7 @@ export function AutowithdrawSettings ({ priority }) {
|
|||
return (
|
||||
<>
|
||||
<Checkbox
|
||||
disabled={!wallet.isConfigured}
|
||||
label='enabled'
|
||||
id='priority'
|
||||
name='priority'
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue