From f04c3cc0597f24273614ec39fcea9a1090dc3c09 Mon Sep 17 00:00:00 2001 From: okbel Date: Thu, 4 Jan 2018 11:53:08 -0300 Subject: [PATCH] Naming Conventions --- client/coral-admin/src/actions/userDetail.js | 4 ++-- client/coral-admin/src/components/UserDetail.js | 4 ++-- client/coral-admin/src/constants/userDetail.js | 2 +- client/coral-admin/src/containers/UserDetail.js | 8 ++++---- client/coral-admin/src/reducers/userDetail.js | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/client/coral-admin/src/actions/userDetail.js b/client/coral-admin/src/actions/userDetail.js index 3a1de5745..1d0a20def 100644 --- a/client/coral-admin/src/actions/userDetail.js +++ b/client/coral-admin/src/actions/userDetail.js @@ -3,12 +3,12 @@ import * as actions from 'constants/userDetail'; export const viewUserDetail = (userId) => ({type: actions.VIEW_USER_DETAIL, userId}); export const hideUserDetail = () => ({type: actions.HIDE_USER_DETAIL}); -export const changeUserDetailStatuses = (tab) => { +export const changeTab = (tab) => { let statuses = null; if (tab === 'rejected') { statuses = ['REJECTED']; } - return {type: actions.CHANGE_USER_DETAIL_STATUSES, tab, statuses}; + return {type: actions.CHANGE_TAB_USER_DETAIL, tab, statuses}; }; export const clearUserDetailSelections = () => ({type: actions.CLEAR_USER_DETAIL_SELECTIONS}); diff --git a/client/coral-admin/src/components/UserDetail.js b/client/coral-admin/src/components/UserDetail.js index 44f7aaed0..c99f704f0 100644 --- a/client/coral-admin/src/components/UserDetail.js +++ b/client/coral-admin/src/components/UserDetail.js @@ -64,7 +64,7 @@ class UserDetail extends React.Component { } changeTab = (tab) => { - this.props.changeStatus(tab); + this.props.changeTab(tab); } showSuspenUserDialog = () => this.props.showSuspendUserDialog({ @@ -329,7 +329,7 @@ UserDetail.propTypes = { root: PropTypes.object.isRequired, acceptComment: PropTypes.func.isRequired, rejectComment: PropTypes.func.isRequired, - changeStatus: PropTypes.func.isRequired, + changeTab: PropTypes.func.isRequired, toggleSelect: PropTypes.func.isRequired, bulkAccept: PropTypes.func.isRequired, bulkReject: PropTypes.func.isRequired, diff --git a/client/coral-admin/src/constants/userDetail.js b/client/coral-admin/src/constants/userDetail.js index f1617f5a3..07049ac84 100644 --- a/client/coral-admin/src/constants/userDetail.js +++ b/client/coral-admin/src/constants/userDetail.js @@ -1,6 +1,6 @@ export const VIEW_USER_DETAIL = 'VIEW_USER_DETAIL'; export const HIDE_USER_DETAIL = 'HIDE_USER_DETAIL'; -export const CHANGE_USER_DETAIL_STATUSES = 'CHANGE_USER_DETAIL_STATUSES'; +export const CHANGE_TAB_USER_DETAIL = 'CHANGE_TAB_USER_DETAIL'; export const SELECT_USER_DETAIL_COMMENT = 'SELECT_USER_DETAIL_COMMENT'; export const UNSELECT_USER_DETAIL_COMMENT = 'UNSELECT_USER_DETAIL_COMMENT'; export const CLEAR_USER_DETAIL_SELECTIONS = 'CLEAR_USER_DETAIL_SELECTIONS'; diff --git a/client/coral-admin/src/containers/UserDetail.js b/client/coral-admin/src/containers/UserDetail.js index e1ffe15a6..d4722384e 100644 --- a/client/coral-admin/src/containers/UserDetail.js +++ b/client/coral-admin/src/containers/UserDetail.js @@ -9,7 +9,7 @@ import {getDefinitionName, getSlotFragmentSpreads} from 'coral-framework/utils'; import { viewUserDetail, hideUserDetail, - changeUserDetailStatuses, + changeTab, clearUserDetailSelections, toggleSelectCommentInUserDetail, toggleSelectAllCommentInUserDetail @@ -117,7 +117,7 @@ class UserDetailContainer extends React.Component { return ({ ...bindActionCreators({ showBanUserDialog, showSuspendUserDialog, - changeUserDetailStatuses, + changeTab, clearUserDetailSelections, toggleSelectCommentInUserDetail, viewUserDetail, diff --git a/client/coral-admin/src/reducers/userDetail.js b/client/coral-admin/src/reducers/userDetail.js index 3ad435973..a7f63ab41 100644 --- a/client/coral-admin/src/reducers/userDetail.js +++ b/client/coral-admin/src/reducers/userDetail.js @@ -25,7 +25,7 @@ export default function banUserDialog(state = initialState, action) { ...state, selectedCommentIds: [], }; - case actions.CHANGE_USER_DETAIL_STATUSES: + case actions.CHANGE_TAB_USER_DETAIL: return { ...state, activeTab: action.tab,