parent
af79eb01fd
commit
c088d4c5df
|
@ -10,7 +10,7 @@ import Namespace from './Namespace'
|
|||
|
||||
let RuleHeader = withColours(
|
||||
({
|
||||
ns,
|
||||
dottedName,
|
||||
type,
|
||||
description,
|
||||
question,
|
||||
|
@ -26,9 +26,7 @@ let RuleHeader = withColours(
|
|||
<section id="ruleHeader">
|
||||
<header className="ui__ plain card">
|
||||
<div>
|
||||
{ns && (
|
||||
<Namespace {...{ ns, flatRules, colour: colours.textColour }} />
|
||||
)}
|
||||
<Namespace {...{ dottedName, flatRules, colour: colours.textColour }} />
|
||||
<h1 style={{ color: colours.textColour }}>
|
||||
{title || capitalise0(name)}
|
||||
</h1>
|
||||
|
|
|
@ -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 (
|
||||
<ul id="namespace">
|
||||
{ns
|
||||
{dottedName
|
||||
.split(' . ')
|
||||
.slice(0, -1)
|
||||
.reduce(
|
||||
(memo, next) => [
|
||||
...memo,
|
||||
|
|
|
@ -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(
|
|||
/>
|
||||
<RuleHeader
|
||||
{...{
|
||||
ns,
|
||||
dottedName,
|
||||
type,
|
||||
description,
|
||||
question,
|
||||
|
|
Loading…
Reference in New Issue