diff --git a/app/soapbox/features/register_invite/index.js b/app/soapbox/features/register_invite/index.js deleted file mode 100644 index 486647bd2..000000000 --- a/app/soapbox/features/register_invite/index.js +++ /dev/null @@ -1,49 +0,0 @@ -import PropTypes from 'prop-types'; -import React from 'react'; -import { FormattedMessage } from 'react-intl'; -import { connect } from 'react-redux'; - -import RegistrationForm from 'soapbox/features/auth_login/components/registration_form'; - -const mapStateToProps = state => { - return { - siteTitle: state.getIn(['instance', 'title']), - }; -}; - -export default @connect(mapStateToProps) -class RegisterInvite extends React.Component { - - static propTypes = { - params: PropTypes.object.isRequired, - siteTitle: PropTypes.string.isRequired, - } - - render() { - const { siteTitle, params } = this.props; - - return ( -
-
-

- -

-

- -

-
-
- -
-
- ); - } - -} diff --git a/app/soapbox/features/register_invite/index.tsx b/app/soapbox/features/register_invite/index.tsx new file mode 100644 index 000000000..c4187c439 --- /dev/null +++ b/app/soapbox/features/register_invite/index.tsx @@ -0,0 +1,43 @@ +import React from 'react'; +import { FormattedMessage } from 'react-intl'; + +import RegistrationForm from 'soapbox/features/auth_login/components/registration_form'; +import { useAppSelector } from 'soapbox/hooks'; + +interface IRegisterInvite { + /** URL params. */ + params: { + /** Invite token from the URL. */ + token: string, + }, +} + +/** Page to register with an invitation. */ +const RegisterInvite: React.FC = ({ params }) => { + const siteTitle = useAppSelector(state => state.instance.title); + + return ( +
+
+

+ +

+

+ +

+
+
+ +
+
+ ); +}; + +export default RegisterInvite;