Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentDidMount() {
window.APP.eruda = eruda
if (this.props.page === 0) {
eruda.show()
}
process.env.NODE_ENV === "production" || console.log('Eruda.componentDidMount')
}
shouldComponentUpdate(nextProps, nextState) {
toggleEruda(bool) {
if (this.props.page === 0) {
eruda.show()
} else {
eruda.hide()
}
}
render() {
const children = stats.dom.children;
for (let i = 0; i < children.length; i += 1) {
children[i].style.display = 'inline-block';
children[i].style.width = '32%';
children[i].style.marginRight = '1%';
children[i].style.height = '84px';
}
}
eruda.init({
container: this.consoleContainer.current,
tool: ['console', 'timing', 'info']
});
eruda.add(erudaTiming);
eruda.show();
const devTools = document.getElementsByClassName('eruda-dev-tools')[0] as HTMLDivElement;
devTools.style.height = '';
}