mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-11-27 09:11:57 +05:30
Реализована форма обратной связи
This commit is contained in:
parent
c883b3afaf
commit
56d88100da
@ -4,7 +4,7 @@ import classNames from 'classnames';
|
||||
import { FormattedMessage as Message } from 'react-intl';
|
||||
|
||||
import { Input, TextArea, Button, Form, FormModel, Dropdown } from 'components/ui/form';
|
||||
import site from 'services/api/site';
|
||||
import feedback from 'services/api/feedback';
|
||||
import icons from 'components/ui/icons.scss';
|
||||
import popupStyles from 'components/ui/popup/popup.scss';
|
||||
|
||||
@ -94,7 +94,7 @@ export default class ContactForm extends Component {
|
||||
}
|
||||
|
||||
onSubmit = () => {
|
||||
site.contact(this.form.serialize())
|
||||
feedback(this.form.serialize())
|
||||
.then(this.props.onClose)
|
||||
.catch((resp) => {
|
||||
if (resp.errors) {
|
||||
|
4
src/services/api/feedback.js
Normal file
4
src/services/api/feedback.js
Normal file
@ -0,0 +1,4 @@
|
||||
import request from 'services/request';
|
||||
|
||||
export default ({subject = '', email = '', message = ''}) =>
|
||||
request.post('/api/feedback', {subject, email, message});
|
@ -1,14 +0,0 @@
|
||||
import request from 'services/request';
|
||||
|
||||
export default {
|
||||
contact({
|
||||
subject = '',
|
||||
email = '',
|
||||
message = ''
|
||||
}) {
|
||||
return request.post(
|
||||
'/api/site/contact',
|
||||
{subject, email, message}
|
||||
);
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user