1
0
Fork 0
mirror of https://github.com/betagouv/mon-entreprise synced 2025-02-08 22:15:02 +00:00
mon-entreprise/source/components/QuickLink.js
Mael 7fed1b930b Remplacement de la suggestion 'CDI' par 'Localisation'
La suggestion CDI correspond au défaut de la simulation. L'enlever
permet de mettre en valeur le CDD.
La localisation permet maintenant, en plus du versement transport, de
calculer le bon impôt pour l'outre-mer.
2018-09-10 18:43:16 +02:00

40 lines
962 B
JavaScript

/* @flow */
import { startConversation } from 'Actions/actions'
import withLanguage from 'Components/utils/withLanguage'
import { toPairs, compose } from 'ramda'
import React from 'react'
import { Trans } from 'react-i18next'
import { connect } from 'react-redux'
type Props = {
startConversation: (?string) => void
}
let quickLinks = {
CDD: 'contrat salarié . type de contrat',
Cadre: 'contrat salarié . statut cadre',
'Temps partiel': 'contrat salarié . temps partiel',
Localisation: 'établissement . localisation',
Autres: null
}
const QuickLink = ({ startConversation }: Props) => (
<>
{toPairs(quickLinks).map(([label, dottedName]) => (
<button
key={label}
className="ui__ link-button"
onClick={() => startConversation(dottedName)}>
<Trans>{label}</Trans>
</button>
))}
</>
)
export default compose(
withLanguage,
connect(
(state, props) => ({ key: props.language }),
{
startConversation
}
)
)(QuickLink)