Break out LoginForm and LoginPage into separate components

This commit is contained in:
Alex Gleason 2020-04-11 21:00:08 -05:00
parent d4c84e2b4e
commit d7ca4d3be1
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
5 changed files with 16 additions and 5 deletions

View file

@ -0,0 +1,11 @@
import React from 'react';
import { connect } from 'react-redux'
import ImmutablePureComponent from 'react-immutable-pure-component';
import LoginForm from './login_form';
export default @connect()
class LoginPage extends ImmutablePureComponent {
render() {
return <LoginForm />
}
}

View file

@ -2,7 +2,7 @@ import React from 'react';
import { connect } from 'react-redux'
import ImmutablePureComponent from 'react-immutable-pure-component';
import { Link } from 'react-router-dom';
import LoginForm from 'gabsocial/features/auth_login';
import LoginForm from 'gabsocial/features/auth_login/components/login_form';
import NotificationsContainer from 'gabsocial/features/ui/containers/notifications_container';
const mapStateToProps = (state, props) => ({

View file

@ -65,7 +65,7 @@ import {
GroupRemovedAccounts,
GroupCreate,
GroupEdit,
LoginForm,
LoginPage,
} from './util/async-components';
import { meUsername } from '../../initial_state';
import { previewState as previewMediaState } from './components/media_modal';
@ -190,7 +190,7 @@ class SwitchingColumnsArea extends React.PureComponent {
return (
<Switch>
{/* <WrappedRoute path='/' component={} publicRoute exact /> */}
<WrappedRoute path='/auth/sign_in' component={LoginForm} publicRoute exact />
<WrappedRoute path='/auth/sign_in' component={LoginPage} publicRoute exact />
{/* <WrappedRoute path='/auth/sign_out' component={LogoutForm} publicRoute exact /> */}
<WrappedRoute path='/' exact page={HomePage} component={HomeTimeline} content={children} />

View file

@ -158,6 +158,6 @@ export function Explore () {
return import(/* webpackChunkName: "features/explore" */'../../explore');
}
export function LoginForm () {
return import(/* webpackChunkName: "features/auth_login" */'../../auth_login');
export function LoginPage () {
return import(/* webpackChunkName: "features/auth_login" */'../../auth_login/components/login_page');
}