2020-02-05 22:45:48 +00:00
|
|
|
import { injectIntl, defineMessages } from 'react-intl'
|
|
|
|
import { me } from '../../initial_state'
|
|
|
|
import Button from '../button'
|
2020-07-25 00:53:09 +01:00
|
|
|
import Text from '../text'
|
2020-02-05 22:45:48 +00:00
|
|
|
import PanelLayout from './panel_layout'
|
2019-08-07 06:02:36 +01:00
|
|
|
|
|
|
|
const messages = defineMessages({
|
|
|
|
title: { id: 'signup_panel.title', defaultMessage: 'New to Gab?' },
|
|
|
|
subtitle: { id: 'signup_panel.subtitle', defaultMessage: 'Sign up now to speak freely.' },
|
2020-02-05 22:45:48 +00:00
|
|
|
register: { id: 'account.register', defaultMessage: 'Sign up' },
|
2020-07-25 00:53:09 +01:00
|
|
|
login: { id: 'account.login', defaultMessage: 'Log in' },
|
2020-02-05 22:45:48 +00:00
|
|
|
})
|
2019-08-07 06:02:36 +01:00
|
|
|
|
2020-02-25 16:04:44 +00:00
|
|
|
export default
|
|
|
|
@injectIntl
|
2019-08-07 06:02:36 +01:00
|
|
|
class SignUpPanel extends PureComponent {
|
2020-07-25 00:53:09 +01:00
|
|
|
|
2019-08-07 06:02:36 +01:00
|
|
|
static propTypes = {
|
|
|
|
intl: PropTypes.object.isRequired,
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
2020-07-25 00:53:09 +01:00
|
|
|
if (me) return null
|
2019-08-07 06:02:36 +01:00
|
|
|
|
2020-02-05 22:45:48 +00:00
|
|
|
const { intl } = this.props
|
2019-08-07 06:02:36 +01:00
|
|
|
|
|
|
|
return (
|
2020-02-05 22:45:48 +00:00
|
|
|
<PanelLayout
|
|
|
|
title={intl.formatMessage(messages.title)}
|
|
|
|
subtitle={intl.formatMessage(messages.subtitle)}
|
|
|
|
>
|
2020-07-25 00:53:09 +01:00
|
|
|
<div className={[_s.default, _s.flexRow, _s.pb5].join(' ')}>
|
|
|
|
<Button
|
|
|
|
isOutline
|
|
|
|
color='brand'
|
|
|
|
backgroundColor='none'
|
|
|
|
href='/auth/sign_in'
|
|
|
|
className={[_s.flexRow, _s.alignItemsCenter, _s.justifyContentCenter, _s.mr10].join(' ')}
|
|
|
|
>
|
|
|
|
<Text color='inherit' weight='medium' align='center' className={_s.px10}>
|
|
|
|
{intl.formatMessage(messages.login)}
|
|
|
|
</Text>
|
|
|
|
</Button>
|
|
|
|
<Button
|
|
|
|
href='/auth/sign_up'
|
|
|
|
className={_s.flexGrow1}
|
|
|
|
>
|
|
|
|
<Text color='inherit' size='large' weight='bold' align='center'>
|
|
|
|
{intl.formatMessage(messages.register)}
|
|
|
|
</Text>
|
|
|
|
</Button>
|
|
|
|
</div>
|
2019-08-07 06:02:36 +01:00
|
|
|
</PanelLayout>
|
|
|
|
)
|
|
|
|
}
|
2020-07-25 00:53:09 +01:00
|
|
|
|
2019-08-07 06:02:36 +01:00
|
|
|
}
|