Improve Redux types part 6/Remove GenericAction (#26005)
* Remove remaining usage of GenericAction in mapDispatchToProps * Remove usage of GenericAction when testing initial state * Remove usage of GenericAction from reducers * Remove GenericAction
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8e165c7685
Коммит
6c0900f1be
@@ -7,7 +7,6 @@ import type {Dispatch} from 'redux';
|
||||
|
||||
import {getConfig, getLicense} from 'mattermost-redux/selectors/entities/general';
|
||||
import {getMyTeams} from 'mattermost-redux/selectors/entities/teams';
|
||||
import type {GenericAction} from 'mattermost-redux/types/actions';
|
||||
|
||||
import {deferNavigation} from 'actions/admin_actions.jsx';
|
||||
import {getCurrentLocale} from 'selectors/i18n';
|
||||
@@ -32,7 +31,7 @@ function mapStateToProps(state: GlobalState) {
|
||||
};
|
||||
}
|
||||
|
||||
function mapDispatchToProps(dispatch: Dispatch<GenericAction>) {
|
||||
function mapDispatchToProps(dispatch: Dispatch) {
|
||||
return {
|
||||
actions: bindActionCreators({
|
||||
deferNavigation,
|
||||
|
||||
@@ -6,7 +6,6 @@ import {bindActionCreators} from 'redux';
|
||||
import type {Dispatch} from 'redux';
|
||||
|
||||
import {updateUserRoles} from 'mattermost-redux/actions/users';
|
||||
import type {GenericAction} from 'mattermost-redux/types/actions';
|
||||
|
||||
import type {GlobalState} from 'types/store';
|
||||
|
||||
@@ -18,7 +17,7 @@ function mapStateToProps(state: GlobalState) {
|
||||
};
|
||||
}
|
||||
|
||||
function mapDispatchToProps(dispatch: Dispatch<GenericAction>) {
|
||||
function mapDispatchToProps(dispatch: Dispatch) {
|
||||
return {
|
||||
actions: bindActionCreators({
|
||||
updateUserRoles,
|
||||
|
||||
@@ -6,7 +6,6 @@ import {bindActionCreators} from 'redux';
|
||||
import type {Dispatch} from 'redux';
|
||||
|
||||
import {updateTeamMemberSchemeRoles, getTeamMembersForUser, getTeamsForUser, removeUserFromTeam} from 'mattermost-redux/actions/teams';
|
||||
import type {GenericAction} from 'mattermost-redux/types/actions';
|
||||
|
||||
import {getCurrentLocale} from 'selectors/i18n';
|
||||
|
||||
@@ -20,7 +19,7 @@ function mapStateToProps(state: GlobalState) {
|
||||
};
|
||||
}
|
||||
|
||||
function mapDispatchToProps(dispatch: Dispatch<GenericAction>) {
|
||||
function mapDispatchToProps(dispatch: Dispatch) {
|
||||
return {
|
||||
actions: bindActionCreators({
|
||||
getTeamMembersForUser,
|
||||
|
||||
@@ -9,7 +9,6 @@ import type {GlobalState} from '@mattermost/types/store';
|
||||
|
||||
import {getTeamStats as loadTeamStats} from 'mattermost-redux/actions/teams';
|
||||
import {getTeamStats} from 'mattermost-redux/selectors/entities/teams';
|
||||
import type {GenericAction} from 'mattermost-redux/types/actions';
|
||||
|
||||
import TeamInList from './team_in_list';
|
||||
|
||||
@@ -19,7 +18,7 @@ function mapStateToProps(state: GlobalState) {
|
||||
};
|
||||
}
|
||||
|
||||
function mapDispatchToProps(dispatch: Dispatch<GenericAction>) {
|
||||
function mapDispatchToProps(dispatch: Dispatch) {
|
||||
return {
|
||||
actions: bindActionCreators({
|
||||
loadTeamStats,
|
||||
|
||||
@@ -15,7 +15,6 @@ import {
|
||||
disablePlugin,
|
||||
} from 'mattermost-redux/actions/admin';
|
||||
import {appsFeatureFlagEnabled} from 'mattermost-redux/selectors/entities/apps';
|
||||
import type {GenericAction} from 'mattermost-redux/types/actions';
|
||||
|
||||
import PluginManagement from './plugin_management';
|
||||
|
||||
@@ -27,7 +26,7 @@ function mapStateToProps(state: any) {
|
||||
};
|
||||
}
|
||||
|
||||
function mapDispatchToProps(dispatch: Dispatch<GenericAction>) {
|
||||
function mapDispatchToProps(dispatch: Dispatch) {
|
||||
return {
|
||||
actions: bindActionCreators({
|
||||
uploadPlugin,
|
||||
|
||||
@@ -6,11 +6,10 @@ import {bindActionCreators} from 'redux';
|
||||
import type {Dispatch} from 'redux';
|
||||
|
||||
import {revokeUserAccessToken} from 'mattermost-redux/actions/users';
|
||||
import type {GenericAction} from 'mattermost-redux/types/actions';
|
||||
|
||||
import RevokeTokenButton from './revoke_token_button';
|
||||
|
||||
function mapDispatchToProps(dispatch: Dispatch<GenericAction>) {
|
||||
function mapDispatchToProps(dispatch: Dispatch) {
|
||||
return {
|
||||
actions: bindActionCreators({
|
||||
revokeUserAccessToken,
|
||||
|
||||
@@ -7,7 +7,6 @@ import type {Dispatch} from 'redux';
|
||||
|
||||
import {getLogs, getPlainLogs} from 'mattermost-redux/actions/admin';
|
||||
import * as Selectors from 'mattermost-redux/selectors/entities/admin';
|
||||
import type {GenericAction} from 'mattermost-redux/types/actions';
|
||||
|
||||
import type {GlobalState} from 'types/store';
|
||||
|
||||
@@ -23,7 +22,7 @@ function mapStateToProps(state: GlobalState) {
|
||||
};
|
||||
}
|
||||
|
||||
function mapDispatchToProps(dispatch: Dispatch<GenericAction>) {
|
||||
function mapDispatchToProps(dispatch: Dispatch) {
|
||||
return {
|
||||
actions: bindActionCreators({
|
||||
getLogs,
|
||||
|
||||
@@ -11,7 +11,6 @@ import {addUserToTeam} from 'mattermost-redux/actions/teams';
|
||||
import {updateUserActive} from 'mattermost-redux/actions/users';
|
||||
import {getConfig} from 'mattermost-redux/selectors/entities/general';
|
||||
import {getUser} from 'mattermost-redux/selectors/entities/users';
|
||||
import type {GenericAction} from 'mattermost-redux/types/actions';
|
||||
|
||||
import {setNavigationBlocked} from 'actions/admin_actions.jsx';
|
||||
|
||||
@@ -31,7 +30,7 @@ function mapStateToProps(state: GlobalState, ownProps: OwnProps) {
|
||||
};
|
||||
}
|
||||
|
||||
function mapDispatchToProps(dispatch: Dispatch<GenericAction>) {
|
||||
function mapDispatchToProps(dispatch: Dispatch) {
|
||||
const apiActions = bindActionCreators({
|
||||
updateUserActive,
|
||||
addUserToTeam,
|
||||
|
||||
@@ -11,7 +11,6 @@ import {
|
||||
removeUserFromTeam,
|
||||
updateTeamMemberSchemeRoles,
|
||||
} from 'mattermost-redux/actions/teams';
|
||||
import type {GenericAction} from 'mattermost-redux/types/actions';
|
||||
|
||||
import {getCurrentLocale} from 'selectors/i18n';
|
||||
|
||||
@@ -25,7 +24,7 @@ function mapStateToProps(state: GlobalState) {
|
||||
};
|
||||
}
|
||||
|
||||
function mapDispatchToProps(dispatch: Dispatch<GenericAction>) {
|
||||
function mapDispatchToProps(dispatch: Dispatch) {
|
||||
return {
|
||||
actions: bindActionCreators({
|
||||
getTeamsData: getTeamsForUser,
|
||||
|
||||
@@ -15,7 +15,6 @@ import {
|
||||
import {getTeam as fetchTeam, membersMinusGroupMembers, patchTeam, removeUserFromTeam, updateTeamMemberSchemeRoles, addUserToTeam, deleteTeam, unarchiveTeam} from 'mattermost-redux/actions/teams';
|
||||
import {getAllGroups, getGroupsAssociatedToTeam} from 'mattermost-redux/selectors/entities/groups';
|
||||
import {getTeam} from 'mattermost-redux/selectors/entities/teams';
|
||||
import type {GenericAction} from 'mattermost-redux/types/actions';
|
||||
|
||||
import {setNavigationBlocked} from 'actions/admin_actions';
|
||||
|
||||
@@ -46,7 +45,7 @@ function mapStateToProps(state: GlobalState, props: OwnProps) {
|
||||
};
|
||||
}
|
||||
|
||||
function mapDispatchToProps(dispatch: Dispatch<GenericAction>) {
|
||||
function mapDispatchToProps(dispatch: Dispatch) {
|
||||
return {
|
||||
actions: bindActionCreators({
|
||||
getTeam: fetchTeam,
|
||||
|
||||
Ссылка в новой задаче
Block a user