aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-12-06 15:33:04 +0800
committerFred Carlsen <fred@sjelfull.no>2018-12-13 01:19:25 +0800
commit13e89d027c767e7a2e775bebd26468baf54712e0 (patch)
treee411ab39e247a16319ab18dc4eebcc7b38130c03 /packages
parentea8f35b74315fb81246082f56ca5f5fd79077d05 (diff)
downloaddexon-sol-tools-13e89d027c767e7a2e775bebd26468baf54712e0.tar
dexon-sol-tools-13e89d027c767e7a2e775bebd26468baf54712e0.tar.gz
dexon-sol-tools-13e89d027c767e7a2e775bebd26468baf54712e0.tar.bz2
dexon-sol-tools-13e89d027c767e7a2e775bebd26468baf54712e0.tar.lz
dexon-sol-tools-13e89d027c767e7a2e775bebd26468baf54712e0.tar.xz
dexon-sol-tools-13e89d027c767e7a2e775bebd26468baf54712e0.tar.zst
dexon-sol-tools-13e89d027c767e7a2e775bebd26468baf54712e0.zip
feat: disable slider when no affiliate info
Diffstat (limited to 'packages')
-rw-r--r--packages/website/ts/pages/instant/config_generator.tsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/website/ts/pages/instant/config_generator.tsx b/packages/website/ts/pages/instant/config_generator.tsx
index fe70ef04c..fbeeeaeaf 100644
--- a/packages/website/ts/pages/instant/config_generator.tsx
+++ b/packages/website/ts/pages/instant/config_generator.tsx
@@ -79,6 +79,11 @@ export class ConfigGenerator extends React.Component<ConfigGeneratorProps, Confi
<FeePercentageSlider
value={value.affiliateInfo.feePercentage}
onChange={this._handleAffiliatePercentageChange}
+ isDisabled={
+ _.isUndefined(value.affiliateInfo) ||
+ _.isUndefined(value.affiliateInfo.feeRecipient) ||
+ _.isEmpty(value.affiliateInfo.feeRecipient)
+ }
/>
</ConfigGeneratorSection>
</Container>