diff --git a/client/src/templates/Challenges/components/Side-Panel.js b/client/src/templates/Challenges/components/Side-Panel.js index af649d8a15..7ebcab0cbd 100644 --- a/client/src/templates/Challenges/components/Side-Panel.js +++ b/client/src/templates/Challenges/components/Side-Panel.js @@ -1,6 +1,5 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import ReactDom from 'react-dom'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; @@ -41,11 +40,6 @@ const propTypes = { }; export class SidePanel extends Component { - constructor(props) { - super(props); - this.bindTopDiv = this.bindTopDiv.bind(this); - } - componentDidMount() { MathJax.Hub.Config({ tex2jax: { @@ -62,26 +56,6 @@ export class SidePanel extends Component { this.props.initConsole(''); } - componentDidUpdate(prevProps) { - MathJax.Hub.Queue([ - 'Typeset', - MathJax.Hub, - document.querySelector('.rosetta-code') - ]); - const { title, initConsole } = this.props; - if (title !== prevProps.title) { - initConsole(''); - const node = ReactDom.findDOMNode(this.descriptionTop); - setTimeout(() => { - node.scrollIntoView({ behavior: 'smooth' }); - }, 0); - } - } - - bindTopDiv(node) { - this.descriptionTop = node; - } - render() { const { title, @@ -95,15 +69,16 @@ export class SidePanel extends Component { } = this.props; return (