⚙️ Permettre de naviguer d'une règle à l'autre

pull/18/head
Laurent Bossavit 2017-06-29 14:46:47 +02:00
parent 56898677f3
commit e72395b93d
1 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,8 @@
import React from 'react'
import R from 'ramda'
import classNames from 'classnames'
import {Link} from 'react-router-dom'
import {encodeRuleName} from 'Engine/rules'
let treatValue = data =>
data == null
@ -40,7 +42,9 @@ export let Leaf = ({classes, name, value}) => (
<span className={classNames(classes, 'leaf')}>
{name &&
<span className="nodeHead">
<span className="name">{name}<NodeValue data={value} /></span>
<Link to={"/regle/" + encodeRuleName(name)} >
<span className="name">{name}<NodeValue data={value} /></span>
</Link>
</span>}
</span>
)