From 6ff34d77fd36502ad4a2f1af0053a9499a977706 Mon Sep 17 00:00:00 2001
From: Alex Gleason
Date: Sat, 7 May 2022 12:02:13 -0500
Subject: [PATCH] RegisterInvite: move to AuthLayout
---
app/soapbox/containers/soapbox.tsx | 1 +
app/soapbox/features/auth_layout/index.tsx | 2 ++
app/soapbox/features/register_invite/index.tsx | 14 ++++++--------
app/soapbox/features/ui/index.tsx | 3 ---
4 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/app/soapbox/containers/soapbox.tsx b/app/soapbox/containers/soapbox.tsx
index 8ec61a645..11cf735d7 100644
--- a/app/soapbox/containers/soapbox.tsx
+++ b/app/soapbox/containers/soapbox.tsx
@@ -192,6 +192,7 @@ const SoapboxMount = () => {
+
diff --git a/app/soapbox/features/auth_layout/index.tsx b/app/soapbox/features/auth_layout/index.tsx
index cb5edd8c4..8c7ac36fc 100644
--- a/app/soapbox/features/auth_layout/index.tsx
+++ b/app/soapbox/features/auth_layout/index.tsx
@@ -12,6 +12,7 @@ import PasswordReset from '../auth_login/components/password_reset';
import PasswordResetConfirm from '../auth_login/components/password_reset_confirm';
import RegistrationForm from '../auth_login/components/registration_form';
import ExternalLoginForm from '../external_login/components/external-login-form';
+import RegisterInvite from '../register_invite';
import Verification from '../verification';
import EmailPassthru from '../verification/email_passthru';
@@ -50,6 +51,7 @@ const AuthLayout = () => {
+
diff --git a/app/soapbox/features/register_invite/index.tsx b/app/soapbox/features/register_invite/index.tsx
index c4187c439..870918220 100644
--- a/app/soapbox/features/register_invite/index.tsx
+++ b/app/soapbox/features/register_invite/index.tsx
@@ -1,19 +1,17 @@
import React from 'react';
import { FormattedMessage } from 'react-intl';
+import { useParams } from 'react-router-dom';
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,
- },
+interface RegisterInviteParams {
+ token: string,
}
/** Page to register with an invitation. */
-const RegisterInvite: React.FC = ({ params }) => {
+const RegisterInvite: React.FC = () => {
+ const { token } = useParams();
const siteTitle = useAppSelector(state => state.instance.title);
return (
@@ -34,7 +32,7 @@ const RegisterInvite: React.FC = ({ params }) => {
-
+
);
diff --git a/app/soapbox/features/ui/index.tsx b/app/soapbox/features/ui/index.tsx
index 6cf6515d6..14e9e5974 100644
--- a/app/soapbox/features/ui/index.tsx
+++ b/app/soapbox/features/ui/index.tsx
@@ -107,7 +107,6 @@ import {
NotificationsContainer,
ModalContainer,
ProfileHoverCard,
- RegisterInvite,
Share,
NewStatus,
IntentionalError,
@@ -288,8 +287,6 @@ const SwitchingColumnsArea: React.FC = ({ children }) => {
{features.scheduledStatuses && }
-
-