gab-social/app/javascript/gabsocial/components/panel/sign_up_panel.js

37 lines
952 B
JavaScript
Raw Normal View History

2020-02-05 22:45:48 +00:00
import { injectIntl, defineMessages } from 'react-intl'
import { me } from '../../initial_state'
import Button from '../button'
import PanelLayout from './panel_layout'
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-02-25 16:04:44 +00:00
export default
@injectIntl
class SignUpPanel extends PureComponent {
static propTypes = {
intl: PropTypes.object.isRequired,
}
render() {
2020-02-05 22:45:48 +00:00
// : TESTING :
if (!me) return null
2020-02-05 22:45:48 +00:00
const { intl } = this.props
return (
2020-02-05 22:45:48 +00:00
<PanelLayout
title={intl.formatMessage(messages.title)}
subtitle={intl.formatMessage(messages.subtitle)}
>
2020-02-19 23:57:07 +00:00
<Button href="/auth/sign_up">
{intl.formatMessage(messages.register)}
</Button>
</PanelLayout>
)
}
}