Break out LoginForm and LoginPage into separate components
This commit is contained in:
parent
d4c84e2b4e
commit
d7ca4d3be1
5 changed files with 16 additions and 5 deletions
11
app/gabsocial/features/auth_login/components/login_page.js
Normal file
11
app/gabsocial/features/auth_login/components/login_page.js
Normal 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 />
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||||
import { connect } from 'react-redux'
|
import { connect } from 'react-redux'
|
||||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||||
import { Link } from 'react-router-dom';
|
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';
|
import NotificationsContainer from 'gabsocial/features/ui/containers/notifications_container';
|
||||||
|
|
||||||
const mapStateToProps = (state, props) => ({
|
const mapStateToProps = (state, props) => ({
|
||||||
|
|
|
@ -65,7 +65,7 @@ import {
|
||||||
GroupRemovedAccounts,
|
GroupRemovedAccounts,
|
||||||
GroupCreate,
|
GroupCreate,
|
||||||
GroupEdit,
|
GroupEdit,
|
||||||
LoginForm,
|
LoginPage,
|
||||||
} from './util/async-components';
|
} from './util/async-components';
|
||||||
import { meUsername } from '../../initial_state';
|
import { meUsername } from '../../initial_state';
|
||||||
import { previewState as previewMediaState } from './components/media_modal';
|
import { previewState as previewMediaState } from './components/media_modal';
|
||||||
|
@ -190,7 +190,7 @@ class SwitchingColumnsArea extends React.PureComponent {
|
||||||
return (
|
return (
|
||||||
<Switch>
|
<Switch>
|
||||||
{/* <WrappedRoute path='/' component={} publicRoute exact /> */}
|
{/* <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='/auth/sign_out' component={LogoutForm} publicRoute exact /> */}
|
||||||
|
|
||||||
<WrappedRoute path='/' exact page={HomePage} component={HomeTimeline} content={children} />
|
<WrappedRoute path='/' exact page={HomePage} component={HomeTimeline} content={children} />
|
||||||
|
|
|
@ -158,6 +158,6 @@ export function Explore () {
|
||||||
return import(/* webpackChunkName: "features/explore" */'../../explore');
|
return import(/* webpackChunkName: "features/explore" */'../../explore');
|
||||||
}
|
}
|
||||||
|
|
||||||
export function LoginForm () {
|
export function LoginPage () {
|
||||||
return import(/* webpackChunkName: "features/auth_login" */'../../auth_login');
|
return import(/* webpackChunkName: "features/auth_login" */'../../auth_login/components/login_page');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue