mirror of
https://github.com/betagouv/mon-entreprise
synced 2025-02-09 00:35:00 +00:00
0237e1c84a
Prochainement : - l'objectif de calcul dans l'URL - faire marcher toutes les règles de co2.yaml - rendre l'exploration correcte (ex. formatter correctemnt les nombres, bien afficher les 'une possibilité') - faire marcher publi.codes/App.js plutôt que d'écraser /embauche
40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
import React from 'react'
|
|
import { analysisWithDefaultsSelector } from 'Selectors/analyseSelectors'
|
|
import { connect } from 'react-redux'
|
|
import './Targets.css'
|
|
import withColours from 'Components/utils/withColours'
|
|
import { Link } from 'react-router-dom'
|
|
import emoji from 'react-easy-emoji'
|
|
|
|
@connect(state => ({ analysis: analysisWithDefaultsSelector(state) }))
|
|
@withColours
|
|
export default class Targets extends React.Component {
|
|
render() {
|
|
let {
|
|
title,
|
|
nodeValue,
|
|
unité: unit,
|
|
dottedName
|
|
} = this.props.analysis.targets[0]
|
|
return (
|
|
<div id="targets">
|
|
<span className="icon">→</span>
|
|
<span className="content">
|
|
{/*<span className="title">{title}</span>
|
|
{' : '} */}
|
|
<span className="figure">
|
|
<span className="value">{nodeValue}</span>{' '}
|
|
<span className="unit">{unit}</span>
|
|
</span>
|
|
<Link
|
|
title="Quel est calcul ?"
|
|
style={{ color: this.props.colours.colour }}
|
|
to={'/règle/' + dottedName}
|
|
className="explanation">
|
|
{emoji('📖')}
|
|
</Link>
|
|
</span>
|
|
</div>
|
|
)
|
|
}
|
|
}
|