/* @flow */ import { startConversation } from 'Actions/actions' import withLanguage from 'Components/utils/withLanguage' import { compose, toPairs } from 'ramda' import React from 'react' import { Trans } from 'react-i18next' import { connect } from 'react-redux' import { withRouter } from 'react-router' import { animated, Spring } from 'react-spring' import type { Location } from 'react-router' type OwnProps = { quickLinks: { [string]: string } } type Props = OwnProps & { startConversation: (?string) => void, location: Location, show: boolean } const QuickLinks = ({ startConversation, show, quickLinks }: Props) => { return ( {styles => ( {toPairs(quickLinks).map(([label, dottedName]) => ( ))} )} ) } export default (compose( withLanguage, withRouter, connect( (state, props) => ({ key: props.language, quickLinks: state.simulation?.config["questions à l'affiche"] }), { startConversation } ) )(QuickLinks): React$ComponentType)