Skip to content

Commit

Permalink
Temp: Remove MathJax (freeCodeCamp#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bouncey committed Jul 27, 2018
1 parent e2e5612 commit 0a74065
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/head/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import favicons from './favicons';
import meta from './meta';
import styleSheets from './styleSheets';
import mathjax from './mathjax';
// import mathjax from './mathjax';

const metaAndStyleSheets = meta
.concat(favicons, styleSheets, mathjax)
.concat(favicons, styleSheets)
.map((element, i) => ({ ...element, key: `meta-stylesheet-${i}` }));

export default metaAndStyleSheets;
18 changes: 10 additions & 8 deletions src/templates/Challenges/components/Side-Panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ const mapDispatchToProps = dispatch =>
initConsole
},
dispatch
);
);

const MathJax = global.MathJax;
// const MathJax = global.MathJax;

const propTypes = {
description: PropTypes.arrayOf(PropTypes.string),
Expand All @@ -39,19 +39,21 @@ const propTypes = {
export class SidePanel extends PureComponent {
constructor(props) {
super(props);
this.bindTopDiv = this.bindTopDiv.bind(this);
MathJax.Hub.Config({
tex2jax: { inlineMath: [['$', '$'], ['\\(', '\\)']] }
});
this.bindTopDiv = this.bindTopDiv.bind(this);
// MathJax.Hub.Config({
// tex2jax: { inlineMath: [['$', '$'], ['\\(', '\\)']] }
// });
}

componentDidMount() {
MathJax.Hub.Queue(['Typeset', MathJax.Hub, document.querySelector('.challenge-instructions')]);
// MathJax.Hub.Queue(['Typeset', MathJax.Hub,
// document.querySelector('.challenge-instructions')]);
this.props.initConsole('');
}

componentDidUpdate(prevProps) {
MathJax.Hub.Queue(['Typeset', MathJax.Hub, document.querySelector('.challenge-instructions')]);
// MathJax.Hub.Queue(['Typeset', MathJax.Hub,
// document.querySelector('.challenge-instructions')]);
const { title, initConsole } = this.props;
if (title !== prevProps.title) {
initConsole('');
Expand Down

0 comments on commit 0a74065

Please sign in to comment.