2017-01-27 11:58:15 +05:30
|
|
|
import React from 'react';
|
2016-05-26 20:21:17 +05:30
|
|
|
import { FormattedMessage as Message } from 'react-intl';
|
2017-05-26 00:41:57 +05:30
|
|
|
import { Link } from 'react-router-dom';
|
2019-12-08 00:32:00 +05:30
|
|
|
import FormComponent from 'app/components/ui/form/FormComponent';
|
2016-05-26 20:21:17 +05:30
|
|
|
|
2019-12-08 00:32:00 +05:30
|
|
|
import styles from './profileForm.scss';
|
2016-05-26 20:21:17 +05:30
|
|
|
import messages from './ProfileForm.intl.json';
|
|
|
|
|
2018-03-26 00:46:45 +05:30
|
|
|
export class BackButton extends FormComponent<{
|
2019-12-07 16:58:52 +05:30
|
|
|
to: string;
|
2018-03-26 00:46:45 +05:30
|
|
|
}> {
|
2019-11-27 14:33:32 +05:30
|
|
|
static defaultProps = {
|
|
|
|
to: '/',
|
|
|
|
};
|
|
|
|
|
|
|
|
render() {
|
|
|
|
const { to } = this.props;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Link
|
|
|
|
className={styles.backButton}
|
|
|
|
to={to}
|
|
|
|
title={this.formatMessage(messages.back)}
|
2019-12-29 17:27:44 +05:30
|
|
|
data-testid="back-to-profile"
|
2019-11-27 14:33:32 +05:30
|
|
|
>
|
|
|
|
<span className={styles.backIcon} />
|
|
|
|
<span className={styles.backText}>
|
|
|
|
<Message {...messages.back} />
|
|
|
|
</span>
|
|
|
|
</Link>
|
|
|
|
);
|
|
|
|
}
|
2016-05-26 20:21:17 +05:30
|
|
|
}
|