2022-03-21 11:09:01 -07:00
|
|
|
import React from 'react';
|
|
|
|
import { FormattedMessage } from 'react-intl';
|
|
|
|
|
|
|
|
import { Button, Stack, Text } from 'soapbox/components/ui';
|
2022-04-04 12:24:42 -07:00
|
|
|
import { useAppSelector, useSoapboxConfig } from 'soapbox/hooks';
|
2022-03-21 11:09:01 -07:00
|
|
|
|
|
|
|
const SignUpPanel = () => {
|
2022-04-04 12:24:42 -07:00
|
|
|
const { singleUserMode } = useSoapboxConfig();
|
|
|
|
const siteTitle = useAppSelector((state) => state.instance.title);
|
|
|
|
const me = useAppSelector((state) => state.me);
|
2022-03-21 11:09:01 -07:00
|
|
|
|
|
|
|
if (me || singleUserMode) return null;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Stack space={2}>
|
|
|
|
<Stack>
|
|
|
|
<Text size='lg' weight='bold'>
|
|
|
|
<FormattedMessage id='signup_panel.title' defaultMessage='New to {site_title}?' values={{ site_title: siteTitle }} />
|
|
|
|
</Text>
|
|
|
|
|
|
|
|
<Text theme='muted'>
|
|
|
|
<FormattedMessage id='signup_panel.subtitle' defaultMessage='Sign up now to discuss.' />
|
|
|
|
</Text>
|
|
|
|
</Stack>
|
|
|
|
|
|
|
|
<Button theme='primary' block to='/'>
|
|
|
|
<FormattedMessage id='account.register' defaultMessage='Sign up' />
|
|
|
|
</Button>
|
|
|
|
</Stack>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default SignUpPanel;
|