🐛 répare le lien vers les pages règles depuis la fiche de paie

pull/294/head
Johan Girod 2018-07-31 16:11:59 +02:00 committed by Mael
parent 3c9715c4c5
commit f685d0c94c
7 changed files with 12 additions and 11 deletions

View File

@ -15,7 +15,7 @@ type Props = Règle & {
}
const RuleLink = ({ lien, nom, colours: { colour }, match, style }: Props) => (
<Link
to={match.path + lien}
to={match.path + '/' + lien}
className="rule-link"
style={{ color: colour, ...style }}>
{capitalise0(nom)}

View File

@ -157,7 +157,7 @@ let Header = ({
<span className="texts">
<span className="optionTitle">
<Link to={match.path + 'règle/' + encodeRuleName(target.dottedName)}>
<Link to={match.path + '/règle/' + encodeRuleName(target.dottedName)}>
{target.title || target.name}
</Link>
</span>

View File

@ -45,7 +45,7 @@ export default (tracker: Tracker) => {
'trackEvent',
'refine',
newState.activeTargetInput,
formattedSituationSelector(newState)[newState.activeTargetInput]
action.question
])
}
if (action.type == 'STEP_ACTION' && action.name == 'unfold') {

View File

@ -34,7 +34,7 @@ export const règleLocaliséeSelector = createSelector(
}
return {
nom: localizedRule.titre || localizedRule.nom,
lien: './règle/' + encodeRuleName(dottedName),
lien: 'règle/' + encodeRuleName(dottedName),
id: dottedName,
...(localizedRule.format ? { type: localizedRule.format } : {})
}

View File

@ -17,7 +17,7 @@ export default class RulesList extends Component {
<SearchBar
showDefaultList={true}
rules={flatRules}
rulePagesBasePath="./règle"
rulePagesBasePath="règle"
/>
</div>
)

View File

@ -1,6 +1,6 @@
import withTracker from 'Components/utils/withTracker'
import React, { Component } from 'react'
import { Redirect, Route, Switch } from 'react-router-dom'
import { Route, Switch } from 'react-router-dom'
import 'Ui/index.css'
import Provider from '../../Provider'
import Landing from './Landing'
@ -31,7 +31,6 @@ class InFranceRoute extends Component {
<Route path="/hiring-process" component={HiringProcess} />
</div>
</>
<Route render={() => <Redirect to="/a" />} />
</Switch>
</Provider>
)

View File

@ -1,10 +1,10 @@
/* @flow */
import Simulateur from 'Components/Simu'
import { compose } from 'ramda'
import React, { Component } from 'react'
import { connect } from 'react-redux'
import * as Animate from 'Ui/animate'
type Props = {
hideText: boolean
}
@ -52,7 +52,9 @@ class SocialSecurity extends Component<Props, {}> {
}
}
export default connect(
state => ({ hideText: state.conversationStarted }),
{}
export default compose(
connect(
state => ({ hideText: state.conversationStarted }),
{}
)
)(SocialSecurity)