Rename SignUpPanel
This commit is contained in:
parent
989b1800fa
commit
32a0438f23
|
@ -0,0 +1,33 @@
|
||||||
|
import React from 'react';
|
||||||
|
import { FormattedMessage } from 'react-intl';
|
||||||
|
|
||||||
|
import { Button, Stack, Text } from 'soapbox/components/ui';
|
||||||
|
import { useAppSelector, useSoapboxConfig } from 'soapbox/hooks';
|
||||||
|
|
||||||
|
const SignUpPanel = () => {
|
||||||
|
const { singleUserMode } = useSoapboxConfig();
|
||||||
|
const siteTitle = useAppSelector((state) => state.instance.title);
|
||||||
|
const me = useAppSelector((state) => state.me);
|
||||||
|
|
||||||
|
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' size='sm'>
|
||||||
|
<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;
|
|
@ -1,55 +0,0 @@
|
||||||
import React from 'react';
|
|
||||||
import { FormattedMessage } from 'react-intl';
|
|
||||||
|
|
||||||
import { Button, HStack, Stack, Text } from 'soapbox/components/ui';
|
|
||||||
import { useAppSelector, useSoapboxConfig } from 'soapbox/hooks';
|
|
||||||
|
|
||||||
const SignUpPanel = () => {
|
|
||||||
const { singleUserMode } = useSoapboxConfig();
|
|
||||||
const siteTitle = useAppSelector((state) => state.instance.title);
|
|
||||||
const me = useAppSelector((state) => state.me);
|
|
||||||
|
|
||||||
if (me || singleUserMode) return null;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<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' size='sm'>
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<div className='fixed bottom-0 left-0 right-0 py-4 bg-primary-600'>
|
|
||||||
<div className='max-w-3xl mx-auto sm:px-6 md:max-w-7xl md:px-8'>
|
|
||||||
<HStack alignItems='center' justifyContent='between'>
|
|
||||||
<Stack>
|
|
||||||
<Text theme='white' size='xl' weight='bold'>
|
|
||||||
<FormattedMessage id='signup_panel.title' defaultMessage='New to {site_title}?' values={{ site_title: siteTitle }} />
|
|
||||||
</Text>
|
|
||||||
|
|
||||||
<Text theme='white' className='opacity-80'>
|
|
||||||
<FormattedMessage id='signup_panel.subtitle' defaultMessage='Sign up now to discuss.' />
|
|
||||||
</Text>
|
|
||||||
</Stack>
|
|
||||||
|
|
||||||
<Button theme='ghost' to='/'>
|
|
||||||
<FormattedMessage id='account.register' defaultMessage='Sign up' />
|
|
||||||
</Button>
|
|
||||||
</HStack>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default SignUpPanel;
|
|
|
@ -343,7 +343,7 @@ export function PromoPanel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function SignUpPanel() {
|
export function SignUpPanel() {
|
||||||
return import(/* webpackChunkName: "features/ui" */'../components/sign_up_panel');
|
return import(/* webpackChunkName: "features/ui" */'../components/panels/sign-up-panel');
|
||||||
}
|
}
|
||||||
|
|
||||||
export function FundingPanel() {
|
export function FundingPanel() {
|
||||||
|
|
|
@ -6599,7 +6599,7 @@
|
||||||
"id": "account.register"
|
"id": "account.register"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"path": "app/soapbox/features/ui/components/sign_up_panel.json"
|
"path": "app/soapbox/features/ui/components/panels/sign-up-panel.json"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"descriptors": [
|
"descriptors": [
|
||||||
|
@ -6949,4 +6949,4 @@
|
||||||
],
|
],
|
||||||
"path": "app/soapbox/pages/profile_page.json"
|
"path": "app/soapbox/pages/profile_page.json"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue