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';
|
2020-07-06 21:59:56 +05:30
|
|
|
import ContactForm from 'app/components/contact';
|
2018-05-05 13:12:29 +05:30
|
|
|
|
2019-12-07 16:58:52 +05:30
|
|
|
type Props = React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
2020-05-24 04:38:24 +05:30
|
|
|
createContactPopup: () => void;
|
2019-06-30 19:02:50 +05:30
|
|
|
};
|
|
|
|
|
2019-11-27 14:33:32 +05:30
|
|
|
function ContactLink({ createContactPopup, ...props }: Props) {
|
2020-05-24 04:38:24 +05:30
|
|
|
return (
|
|
|
|
<a
|
|
|
|
href="#"
|
|
|
|
data-e2e-button="feedbackPopup"
|
|
|
|
onClick={(event) => {
|
|
|
|
event.preventDefault();
|
2018-05-05 13:12:29 +05:30
|
|
|
|
2020-05-24 04:38:24 +05:30
|
|
|
createContactPopup();
|
|
|
|
}}
|
|
|
|
{...props}
|
|
|
|
/>
|
|
|
|
);
|
2018-05-05 13:12:29 +05:30
|
|
|
}
|
|
|
|
|
2019-12-07 16:58:52 +05:30
|
|
|
export default connect(null, {
|
2020-05-24 04:38:24 +05:30
|
|
|
createContactPopup: () => createPopup({ Popup: ContactForm }),
|
2019-11-27 14:33:32 +05:30
|
|
|
})(ContactLink);
|