2018-05-05 13:12:29 +05:30
|
|
|
// @flow
|
2019-06-30 19:02:50 +05:30
|
|
|
import type { ElementConfig } from 'react';
|
2018-05-05 13:12:29 +05:30
|
|
|
import React from 'react';
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { create as createPopup } from 'components/ui/popup/actions';
|
|
|
|
import ContactForm from './ContactForm';
|
|
|
|
|
2019-06-30 19:02:50 +05:30
|
|
|
type OwnProps = $Exact<ElementConfig<'a'>>;
|
|
|
|
|
|
|
|
type Props = {
|
2019-11-27 14:33:32 +05:30
|
|
|
...OwnProps,
|
|
|
|
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"
|
|
|
|
onClick={event => {
|
|
|
|
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-11-27 14:33:32 +05:30
|
|
|
export default connect<Props, OwnProps, _, _, _, _>(null, {
|
|
|
|
createContactPopup: () => createPopup({ Popup: ContactForm }),
|
|
|
|
})(ContactLink);
|