Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const mapStateToProps = (state, ownProps) => {
const account = ownProps.account.replace('.', '\\.');
return {
used: get(state.accounts, `${account}.ram_usage`),
max: get(state.accounts, `${account}.ram_quota`),
};
};
response: data => get(data, "i18n.i18NLocales")
},
response: data => get(data, "cms.pageBuilder.categories")
},
response: data => get(data, "security.users")
},
modifyWhitelist = (e, { index, name }) => {
const { whitelist } = this.state;
const current = get(whitelist, `flexible.${index}.${name}`, false);
const modified = set(whitelist, `flexible.${index}.${name}`, !current);
this.setState({ whitelist: modified });
}
onShareLink = () => this.setState({ displayShareLink: !this.state.displayShareLink })
<header>
{t('producers_info_links')}
</header>
<header>
{t('producers_info_social')}
</header>
<div>
{this.socialLink('steemit')}</div>
return configs.map((config, i) => {
if (config.type === 'group') {
return this.getFormGroup(config, callbacks, store)
}
if (config.isHidden && config.isHidden(store)) {
return false
}
if (!config.resultPath) {
return new Error(`Provide a resultPath in config[${i}]`)
}
const value = dotObject.get(store, config.resultPath, undefined)
const error = this.validateField(value, config)
this.errors[groupId] = this.errors[groupId] || []
this.errors[groupId][i] = {
id: config.id,
error,
}
const props = {
config,
value,
callbacks: this.bindCallbacks(config, callbacks),
}
const Element: any = this.getFormElement(config.type)
return (
props: ({ data }) => {
if (data.loading) {
return { elements: null };
}
const elements = get(data, "pageBuilder.elements.data");
if (!elementsAdded) {
elements.forEach(el => {
if (el.type === "element") {
createElementPlugin(el);
} else {
createBlockPlugin(el);
}
});
elementsAdded = true;
}
return { elements };
}
});
tick() {
const {
actions,
settings
} = this.props;
const {
openModal
} = this.state;
const {
getBidForName
} = actions;
if (!openModal) {
(get(settings, `recentBids.${settings.chainId}.${settings.account}`) || []).forEach((bid) => {
getBidForName(bid.newname);
});
}
}
const mapStateToProps = (state, ownProps) => {
const account = ownProps.account.replace('.', '\\.');
return {
currentHeight: get(state, 'chain.head_block_num'),
lastHeight: get(state, `accounts.${account}.head_block_num`),
lastUpdate: get(state, `accounts.${account}.head_block_time`),
};
};