diff --git a/source/engine/mecanismViews/Somme.js b/source/engine/mecanismViews/Somme.js index 7e2c99830..3066e1da0 100644 --- a/source/engine/mecanismViews/Somme.js +++ b/source/engine/mecanismViews/Somme.js @@ -4,47 +4,46 @@ import {path} from 'ramda' import {Node, NodeValue} from './common' -export default class Somme extends Component { - render() { - let {explanation, nodeValue} = this.props - return + } /> - } - renderTable = explanation => ( - - - {explanation.map((v, i) => { - let rowFormula = path(["explanation", "formule", "explanation"], v), - isSomme = rowFormula && rowFormula.name == "somme" - return [ - - - - - , - ...(isSomme - ? [ - - - - ] - : []) - ] - })} - -
-
{i != 0 && "+"}{makeJsx(v)} - -
- - {this.renderTable(rowFormula.explanation)} -
- ) +let Table = ({explanation}) => + + {explanation.map((v, i) => )} + +
+
+ + +class Row extends Component { + render() { + let {v, i} = this.props, + rowFormula = path(["explanation", "formule", "explanation"], v), + isSomme = rowFormula && rowFormula.name == "somme" + + return [ + + {i != 0 && "+"} + {makeJsx(v)} + + + + , + ...(isSomme + ? [ + + + + + + + ] + : []) + ] + } }