From c088d4c5dfd0ce5bd6b31ee635d9894a68b66c28 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Wed, 16 Oct 2019 12:02:53 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20R=C3=A9-affiche=20le=20fil=20d'a?= =?UTF-8?q?riane=20sur=20la=20documentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrige une régression de 1ccaf94 --- source/components/rule/Header.js | 6 ++---- source/components/rule/Namespace.js | 5 +++-- source/components/rule/Rule.js | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/source/components/rule/Header.js b/source/components/rule/Header.js index f388f6cba..5d7cb1a85 100644 --- a/source/components/rule/Header.js +++ b/source/components/rule/Header.js @@ -10,7 +10,7 @@ import Namespace from './Namespace' let RuleHeader = withColours( ({ - ns, + dottedName, type, description, question, @@ -26,9 +26,7 @@ let RuleHeader = withColours(
- {ns && ( - - )} +

{title || capitalise0(name)}

diff --git a/source/components/rule/Namespace.js b/source/components/rule/Namespace.js index cd8c25353..f5ed8ce56 100644 --- a/source/components/rule/Namespace.js +++ b/source/components/rule/Namespace.js @@ -6,11 +6,12 @@ import { Link } from 'react-router-dom' import { capitalise0 } from '../../utils' import './Namespace.css' -let Namespace = ({ ns, flatRules, colour, sitePaths }) => { +let Namespace = ({ dottedName, flatRules, colour, sitePaths }) => { return (
    - {ns + {dottedName .split(' . ') + .slice(0, -1) .reduce( (memo, next) => [ ...memo, diff --git a/source/components/rule/Rule.js b/source/components/rule/Rule.js index 90b522da4..db64448d2 100644 --- a/source/components/rule/Rule.js +++ b/source/components/rule/Rule.js @@ -57,7 +57,7 @@ export default compose( const { t } = useTranslation() let flatRule = findRuleByDottedName(flatRules, dottedName) - let { type, name, title, description, question, ns, icon } = flatRule, + let { type, name, title, description, question, icon } = flatRule, namespaceRules = findRuleByNamespace(flatRules, dottedName) let displayedRule = analysedExample || analysedRule @@ -109,7 +109,7 @@ export default compose( />