The code powering m.abunchtell.com https://m.abunchtell.com
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

28 satır
723 B

  1. import React from 'react';
  2. import { FormattedMessage } from 'react-intl';
  3. import PropTypes from 'prop-types';
  4. class ColumnBackButton extends React.PureComponent {
  5. static contextTypes = {
  6. router: PropTypes.object,
  7. };
  8. handleClick = () => {
  9. if (window.history && window.history.length === 1) this.context.router.push('/');
  10. else this.context.router.goBack();
  11. }
  12. render () {
  13. return (
  14. <div role='button' tabIndex='0' onClick={this.handleClick} className='column-back-button'>
  15. <i className='fa fa-fw fa-chevron-left column-back-button__icon' />
  16. <FormattedMessage id='column_back_button.label' defaultMessage='Back' />
  17. </div>
  18. );
  19. }
  20. }
  21. export default ColumnBackButton;