fix ColumnBackButtonSlim should extended from ColumnBackButton (#6417)

lolsob-rspec
takayamaki 2018-02-04 02:41:51 +09:00 committed by Eugen Rochko
parent 5892127534
commit 5ad806ecab
1 changed files with 2 additions and 11 deletions

View File

@ -1,17 +1,8 @@
import React from 'react'; import React from 'react';
import { FormattedMessage } from 'react-intl'; import { FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types'; import ColumnBackButton from './column_back_button';
export default class ColumnBackButtonSlim extends React.PureComponent { export default class ColumnBackButtonSlim extends ColumnBackButton {
static contextTypes = {
router: PropTypes.object,
};
handleClick = () => {
if (window.history && window.history.length === 1) this.context.router.history.push('/');
else this.context.router.history.goBack();
}
render () { render () {
return ( return (