2018-05-05 13:12:29 +05:30
|
|
|
// @flow
|
|
|
|
import React from 'react';
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { create as createPopup } from 'components/ui/popup/actions';
|
|
|
|
import ContactForm from './ContactForm';
|
|
|
|
|
2018-11-10 14:33:47 +05:30
|
|
|
function ContactLink({
|
|
|
|
createContactPopup,
|
|
|
|
...props
|
|
|
|
}: {
|
2018-05-05 13:12:29 +05:30
|
|
|
createContactPopup: () => void,
|
|
|
|
props: Object
|
|
|
|
}) {
|
|
|
|
return (
|
2018-11-10 14:33:47 +05:30
|
|
|
<a
|
|
|
|
href="#"
|
|
|
|
data-e2e-button="feedbackPopup"
|
|
|
|
onClick={(event) => {
|
|
|
|
event.preventDefault();
|
2018-05-05 13:12:29 +05:30
|
|
|
|
2018-11-10 14:33:47 +05:30
|
|
|
createContactPopup();
|
|
|
|
}}
|
|
|
|
{...props}
|
|
|
|
/>
|
2018-05-05 13:12:29 +05:30
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2018-11-10 14:33:47 +05:30
|
|
|
export default connect(
|
|
|
|
null,
|
|
|
|
{
|
|
|
|
createContactPopup: () => createPopup(ContactForm)
|
|
|
|
}
|
|
|
|
)(ContactLink);
|