From 937cc18012e46077b4ca195536b73dcd467679c8 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 24 Sep 2021 11:37:47 -0500 Subject: [PATCH] Add basic invite route, fix Chats fetch --- .../auth_login/components/registration_form.js | 7 ------- app/soapbox/features/register_invite/index.js | 10 ++++++++++ app/soapbox/features/ui/index.js | 8 ++++++-- app/soapbox/features/ui/util/async-components.js | 4 ++++ 4 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 app/soapbox/features/register_invite/index.js diff --git a/app/soapbox/features/auth_login/components/registration_form.js b/app/soapbox/features/auth_login/components/registration_form.js index b0518c704..3e3fb9b1b 100644 --- a/app/soapbox/features/auth_login/components/registration_form.js +++ b/app/soapbox/features/auth_login/components/registration_form.js @@ -167,13 +167,6 @@ class RegistrationForm extends ImmutablePureComponent {
-

- {instance.get('title')} }} - /> -

; + } + +} diff --git a/app/soapbox/features/ui/index.js b/app/soapbox/features/ui/index.js index 5d9321d65..1badfaae2 100644 --- a/app/soapbox/features/ui/index.js +++ b/app/soapbox/features/ui/index.js @@ -106,6 +106,7 @@ import { NotificationsContainer, ModalContainer, ProfileHoverCard, + RegisterInvite, } from './util/async-components'; // Dummy import, to make sure that ends up in the application bundle. @@ -275,6 +276,9 @@ class SwitchingColumnsArea extends React.PureComponent { + + + @@ -482,9 +486,9 @@ class UI extends React.PureComponent { componentDidUpdate(prevProps) { this.connectStreaming(); - const { dispatch, features } = this.props; + const { dispatch, account, features } = this.props; - if (features.chats && !prevProps.features.chats) { + if (features.chats && account && !prevProps.features.chats) { dispatch(fetchChats()); } } diff --git a/app/soapbox/features/ui/util/async-components.js b/app/soapbox/features/ui/util/async-components.js index 5bee4d041..19a5fa1c5 100644 --- a/app/soapbox/features/ui/util/async-components.js +++ b/app/soapbox/features/ui/util/async-components.js @@ -401,3 +401,7 @@ export function WhoToFollowPanel() { export function FollowRecommendations() { return import(/* webpackChunkName: "features/follow_recommendations" */'../../follow_recommendations'); } + +export function RegisterInvite() { + return import(/* webpackChunkName: "features/register_invite" */'../../register_invite'); +}