Add email and password change functionality for a current user, remove deep compare hooks
This commit is contained in:
4
client/src/reducers/login.js → client/src/reducers/forms/authenticate.js
Executable file → Normal file
4
client/src/reducers/login.js → client/src/reducers/forms/authenticate.js
Executable file → Normal file
@@ -1,4 +1,4 @@
|
||||
import ActionTypes from '../constants/ActionTypes';
|
||||
import ActionTypes from '../../constants/ActionTypes';
|
||||
|
||||
const initialState = {
|
||||
data: {
|
||||
@@ -19,7 +19,7 @@ export default (state = initialState, { type, payload }) => {
|
||||
...payload.data,
|
||||
},
|
||||
};
|
||||
case ActionTypes.AUTHENTICATION_ERROR_CLEAR:
|
||||
case ActionTypes.AUTHENTICATE_ERROR_CLEAR:
|
||||
return {
|
||||
...state,
|
||||
error: null,
|
||||
11
client/src/reducers/forms/index.js
Normal file
11
client/src/reducers/forms/index.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import { combineReducers } from 'redux';
|
||||
|
||||
import authenticate from './authenticate';
|
||||
import userCreate from './user-create';
|
||||
import projectCreate from './project-create';
|
||||
|
||||
export default combineReducers({
|
||||
authenticate,
|
||||
userCreate,
|
||||
projectCreate,
|
||||
});
|
||||
2
client/src/reducers/project.js → client/src/reducers/forms/project-create.js
Executable file → Normal file
2
client/src/reducers/project.js → client/src/reducers/forms/project-create.js
Executable file → Normal file
@@ -1,4 +1,4 @@
|
||||
import ActionTypes from '../constants/ActionTypes';
|
||||
import ActionTypes from '../../constants/ActionTypes';
|
||||
|
||||
const initialState = {
|
||||
data: {
|
||||
4
client/src/reducers/user.js → client/src/reducers/forms/user-create.js
Executable file → Normal file
4
client/src/reducers/user.js → client/src/reducers/forms/user-create.js
Executable file → Normal file
@@ -1,4 +1,4 @@
|
||||
import ActionTypes from '../constants/ActionTypes';
|
||||
import ActionTypes from '../../constants/ActionTypes';
|
||||
|
||||
const initialState = {
|
||||
data: {
|
||||
@@ -19,7 +19,7 @@ export default (state = initialState, { type, payload }) => {
|
||||
...payload.data,
|
||||
},
|
||||
};
|
||||
case ActionTypes.USER_CREATION_ERROR_CLEAR:
|
||||
case ActionTypes.USER_CREATE_ERROR_CLEAR:
|
||||
return {
|
||||
...state,
|
||||
error: null,
|
||||
@@ -2,20 +2,20 @@ import { combineReducers } from 'redux';
|
||||
|
||||
import router from './router';
|
||||
import socket from './socket';
|
||||
import db from './db';
|
||||
import orm from './orm';
|
||||
import auth from './auth';
|
||||
import login from './login';
|
||||
import app from './app';
|
||||
import user from './user';
|
||||
import project from './project';
|
||||
import authenticateForm from './forms/authenticate';
|
||||
import userCreateForm from './forms/user-create';
|
||||
import projectCreateForm from './forms/project-create';
|
||||
|
||||
export default combineReducers({
|
||||
router,
|
||||
socket,
|
||||
db,
|
||||
orm,
|
||||
auth,
|
||||
login,
|
||||
app,
|
||||
user,
|
||||
project,
|
||||
authenticateForm,
|
||||
userCreateForm,
|
||||
projectCreateForm,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user