Browse Source

fix ColumnBackButtonSlim should extended from ColumnBackButton (#6417)

closed-social-v3
takayamaki 6 years ago
committed by Eugen Rochko
parent
commit
d75d2a9f99
1 changed files with 2 additions and 11 deletions
  1. +2
    -11
      app/javascript/mastodon/components/column_back_button_slim.js

+ 2
- 11
app/javascript/mastodon/components/column_back_button_slim.js View File

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

Loading…
Cancel
Save