mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-21 12:05:07 +01:00
fix ColumnBackButtonSlim should extended from ColumnBackButton (#6417)
This commit is contained in:
parent
f7bf36d8fc
commit
d75d2a9f99
@ -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 (
|
||||||
|
Loading…
Reference in New Issue
Block a user