2018-05-05 13:12:29 +05:30
|
|
|
import React from 'react';
|
|
|
|
import { connect } from 'react-redux';
|
2019-12-08 00:32:00 +05:30
|
|
|
import { create as createPopup } from 'app/components/ui/popup/actions';
|
2018-05-05 13:12:29 +05:30
|
|
|
import ContactForm from './ContactForm';
|
|
|
|
|
2019-12-07 16:58:52 +05:30
|
|
|
type Props = React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
|
|
createContactPopup: () => void;
|
2019-06-30 19:02:50 +05:30
|
|
|
};
|
|
|
|
|
2019-11-27 14:33:32 +05:30
|
|
|
function ContactLink({ createContactPopup, ...props }: Props) {
|
|
|
|
return (
|
|
|
|
<a
|
|
|
|
href="#"
|
|
|
|
data-e2e-button="feedbackPopup"
|
2020-05-20 22:05:52 +05:30
|
|
|
onClick={(event) => {
|
2019-11-27 14:33:32 +05:30
|
|
|
event.preventDefault();
|
2018-05-05 13:12:29 +05:30
|
|
|
|
2019-11-27 14:33:32 +05:30
|
|
|
createContactPopup();
|
|
|
|
}}
|
|
|
|
{...props}
|
|
|
|
/>
|
|
|
|
);
|
2018-05-05 13:12:29 +05:30
|
|
|
}
|
|
|
|
|
2019-12-07 16:58:52 +05:30
|
|
|
export default connect(null, {
|
2019-11-27 14:33:32 +05:30
|
|
|
createContactPopup: () => createPopup({ Popup: ContactForm }),
|
|
|
|
})(ContactLink);
|