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-12-10 06:53:17 +00:00
|
|
|
<a className='promo-panel-item__btn' href='https://shop.dissenter.com'>
|
|
|
|
<Icon id='shopping-cart' className='promo-panel-item__icon' fixedWidth />
|
|
|
|
<FormattedMessage id='promo.store' defaultMessage='Store - Buy Merch' />
|
2019-08-20 21:00:54 +01:00
|
|
|
</a>
|
|
|
|
</div>
|
2019-07-02 08:10:25 +01:00
|
|
|
|
2019-10-22 01:03:09 +01:00
|
|
|
<div className='promo-panel-item'>
|
|
|
|
<a className='promo-panel-item__btn' href='https://trends.gab.com'>
|
|
|
|
<Icon id='signal' className='promo-panel-item__icon' fixedWidth />
|
|
|
|
<FormattedMessage id='promo.trends' defaultMessage='Trends' />
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
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>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|