2019-07-02 08:10:25 +01:00
|
|
|
import React from 'react';
|
2019-09-19 00:45:59 +01:00
|
|
|
import PropTypes from 'prop-types';
|
2019-08-18 17:19:10 +01:00
|
|
|
import { FormattedMessage } from 'react-intl';
|
2019-07-02 08:10:25 +01:00
|
|
|
import Icon from 'gabsocial/components/icon';
|
2019-09-19 00:45:59 +01:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { me } from '../../../initial_state';
|
|
|
|
|
|
|
|
const mapStateToProps = state => {
|
|
|
|
return {
|
|
|
|
isPro: state.getIn(['accounts', me, 'is_pro']),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export default
|
|
|
|
@connect(mapStateToProps)
|
|
|
|
class PromoPanel extends React.PureComponent {
|
|
|
|
static propTypes = {
|
|
|
|
isPro: PropTypes.bool,
|
|
|
|
};
|
2019-07-02 08:10:25 +01:00
|
|
|
|
2019-08-18 17:19:10 +01:00
|
|
|
render() {
|
2019-09-19 00:45:59 +01:00
|
|
|
const { isPro } = this.props;
|
|
|
|
|
2019-08-18 17:19:10 +01:00
|
|
|
return (
|
2019-08-20 21:36:07 +01:00
|
|
|
<div className='wtf-panel promo-panel'>
|
2019-08-18 17:19:10 +01:00
|
|
|
<div className='promo-panel__container'>
|
2019-09-19 00:45:59 +01:00
|
|
|
{
|
|
|
|
!isPro &&
|
|
|
|
<div className='promo-panel-item promo-panel-item--highlighted'>
|
|
|
|
<a className='promo-panel-item__btn' href='https://pro.gab.com'>
|
|
|
|
<Icon id='arrow-up' className='promo-panel-item__icon' fixedWidth />
|
|
|
|
<FormattedMessage id='promo.gab_pro' defaultMessage='Upgrade to GabPRO' />
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
|
|
|
|
<div className={`promo-panel-item ${!isPro ? 'promo-panel-item--top-rounded' : ''}`}>
|
2019-09-04 04:20:54 +01:00
|
|
|
<a className='promo-panel-item__btn' href='https://news.gab.com'>
|
2019-08-20 21:00:54 +01:00
|
|
|
<Icon id='align-left' className='promo-panel-item__icon' fixedWidth />
|
|
|
|
<FormattedMessage id='promo.gab_news' defaultMessage='Gab News' />
|
|
|
|
</a>
|
|
|
|
</div>
|
2019-07-02 08:10:25 +01:00
|
|
|
|
2019-08-18 17:19:10 +01:00
|
|
|
<div className='promo-panel-item'>
|
2019-09-04 04:20:54 +01:00
|
|
|
<a className='promo-panel-item__btn' href='https://news.gab.com/support-gab'>
|
2019-08-20 21:36:07 +01:00
|
|
|
<Icon id='users' className='promo-panel-item__icon' fixedWidth />
|
2019-08-20 21:00:54 +01:00
|
|
|
<FormattedMessage id='promo.partners' defaultMessage='Affiliate Partners' />
|
2019-08-18 17:19:10 +01:00
|
|
|
</a>
|
|
|
|
</div>
|
2019-07-02 08:10:25 +01:00
|
|
|
|
2019-08-20 21:00:54 +01:00
|
|
|
<div className='promo-panel-item'>
|
2019-08-20 21:36:07 +01:00
|
|
|
<a className='promo-panel-item__btn' href='https://apps.gab.com'>
|
2019-08-20 21:00:54 +01:00
|
|
|
<Icon id='th' className='promo-panel-item__icon' fixedWidth />
|
|
|
|
<FormattedMessage id='promo.gab_apps' defaultMessage='Gab Apps' />
|
|
|
|
</a>
|
|
|
|
</div>
|
2019-08-18 17:19:10 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|