Merge pull request #458 from betagouv/corrections-mineures

Corrections mineures
pull/460/head
Mael 2019-02-11 11:45:05 +01:00 committed by GitHub
commit 571e1a55f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 20 deletions

View File

@ -1,13 +1,13 @@
import { EXPLAIN_VARIABLE } from 'Actions/actions';
import classNames from 'classnames';
import { findRuleByDottedName } from 'Engine/rules';
import { compose } from 'ramda';
import React from 'react';
import emoji from 'react-easy-emoji';
import { connect } from 'react-redux';
import { flatRulesSelector } from 'Selectors/analyseSelectors';
import withTracker from '../utils/withTracker';
import './Explicable.css';
import { EXPLAIN_VARIABLE } from 'Actions/actions'
import classNames from 'classnames'
import { findRuleByDottedName } from 'Engine/rules'
import { compose } from 'ramda'
import React from 'react'
import emoji from 'react-easy-emoji'
import { connect } from 'react-redux'
import { flatRulesSelector } from 'Selectors/analyseSelectors'
import withTracker from '../utils/withTracker'
import './Explicable.css'
export default compose(
connect(
@ -24,13 +24,7 @@ export default compose(
)(
class Explicable extends React.Component {
render() {
let {
flatRules,
dottedName,
explain,
explained,
tracker,
} = this.props
let { flatRules, dottedName, explain, explained, tracker } = this.props
// Rien à expliquer ici, ce n'est pas une règle
if (dottedName == null) return null
@ -41,7 +35,7 @@ export default compose(
//TODO montrer les variables de type 'une possibilité'
return (
return dottedName === explained ? null : (
<span
className={classNames('explicable', {
explained: dottedName === explained
@ -54,7 +48,7 @@ export default compose(
e.preventDefault()
e.stopPropagation()
}}>
{emoji(dottedName === explained ? '📖' : '📘')}
{emoji('')}
</span>
</span>
)

View File

@ -42,7 +42,7 @@ let Comp = withLanguage(function Variations({
:
</span>
<span className="consequenceContent">
{makeJsx(consequence)}
{consequence && makeJsx(consequence)}
</span>
</div>
</div>