import { goBackToSimulation } from 'Actions/actions' import { ScrollToTop } from 'Components/utils/Scroll' import { encodeRuleName } from 'Engine/rules' import { decodeRuleName, findRuleByDottedName, findRulesByName } from 'Engine/rules.js' import { compose, head } from 'ramda' import React from 'react' import emoji from 'react-easy-emoji' import { Trans } from 'react-i18next' import { connect } from 'react-redux' import { Link, Redirect } from 'react-router-dom' import { flatRulesSelector, noUserInputSelector, situationBranchNameSelector } from 'Selectors/analyseSelectors' import { capitalise0 } from '../utils' import Namespace from './rule/Namespace' import Rule from './rule/Rule' import './RulePage.css' import SearchButton from './SearchButton' export default compose( connect(state => ({ valuesToShow: !noUserInputSelector(state), flatRules: flatRulesSelector(state), brancheName: situationBranchNameSelector(state) })) )(function RulePage({ flatRules, match, valuesToShow, brancheName }) { let name = match?.params?.name, decodedRuleName = decodeRuleName(name) const renderRule = dottedName => { return (