Add basic invite route, fix Chats fetch
This commit is contained in:
@ -167,13 +167,6 @@ class RegistrationForm extends ImmutablePureComponent {
|
||||
<SimpleForm onSubmit={this.onSubmit}>
|
||||
<fieldset disabled={isLoading || !isOpen}>
|
||||
<div className='simple_form__overlay-area'>
|
||||
<p className='lead'>
|
||||
<FormattedMessage
|
||||
id='registration.lead'
|
||||
defaultMessage="With an account on {instance} you'll be able to follow people on any server in the fediverse."
|
||||
values={{ instance: <strong>{instance.get('title')}</strong> }}
|
||||
/>
|
||||
</p>
|
||||
<div className='fields-group'>
|
||||
<TextInput
|
||||
placeholder={intl.formatMessage(messages.username)}
|
||||
|
||||
10
app/soapbox/features/register_invite/index.js
Normal file
10
app/soapbox/features/register_invite/index.js
Normal file
@ -0,0 +1,10 @@
|
||||
import React from 'react';
|
||||
import RegistrationForm from 'soapbox/features/auth_login/components/registration_form';
|
||||
|
||||
export default class RegisterInvite extends React.PureComponent {
|
||||
|
||||
render() {
|
||||
return <RegistrationForm />;
|
||||
}
|
||||
|
||||
}
|
||||
@ -106,6 +106,7 @@ import {
|
||||
NotificationsContainer,
|
||||
ModalContainer,
|
||||
ProfileHoverCard,
|
||||
RegisterInvite,
|
||||
} from './util/async-components';
|
||||
|
||||
// Dummy import, to make sure that <Status /> ends up in the application bundle.
|
||||
@ -275,6 +276,9 @@ class SwitchingColumnsArea extends React.PureComponent {
|
||||
<WrappedRoute path='/statuses/:statusId' exact component={Status} content={children} componentParams={{ shouldUpdateScroll: this.shouldUpdateScroll }} />
|
||||
<WrappedRoute path='/scheduled_statuses' page={DefaultPage} component={ScheduledStatuses} content={children} />
|
||||
|
||||
<Redirect from='/registration/:token' to='/invite/:token' />
|
||||
<WrappedRoute path='/invite/:token' component={RegisterInvite} content={children} publicRoute />
|
||||
|
||||
<Redirect exact from='/settings' to='/settings/preferences' />
|
||||
<WrappedRoute path='/settings/preferences' page={DefaultPage} component={Preferences} content={children} />
|
||||
<WrappedRoute path='/settings/profile' page={DefaultPage} component={EditProfile} content={children} />
|
||||
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user