fix issue, removed unused calls

This commit is contained in:
Hetu Nandu 2020-05-01 15:35:18 +05:30
parent 7510990e88
commit f38f92d938
4 changed files with 2 additions and 20 deletions

View File

@ -14,10 +14,9 @@ import { ControlWrapper } from "components/propertyControls/StyledControls";
import { KeyValueComponent } from "components/propertyControls/KeyValueComponent";
import { InputText } from "components/propertyControls/InputTextControl";
import { createModalAction } from "actions/widgetActions";
import { createActionRequest } from "actions/actionActions";
import { DEFAULT_API_ACTION } from "constants/ApiEditorConstants";
import { createNewApiName } from "utils/AppsmithUtils";
import { isDynamicValue } from "utils/DynamicBindingUtils";
import { createNewApiAction } from "actions/apiPaneActions";
const ALERT_STYLE_OPTIONS = [
{ label: "Info", value: "'info'", id: "info" },
@ -667,13 +666,7 @@ function useApiOptionTree() {
value: `${apiName}.run`,
type: ActionType.api,
});
dispatch(
createActionRequest({
...DEFAULT_API_ACTION,
name: apiName,
pageId: pageId,
}),
);
dispatch(createNewApiAction(pageId));
}
},
});

View File

@ -24,7 +24,6 @@ import {
getProvidersLoadingState,
} from "selectors/applicationSelectors";
import { getProviderCategories } from "selectors/editorSelectors";
import { createActionRequest } from "actions/actionActions";
import { fetchImportedCollections } from "actions/collectionAction";
import { API_HOME_SCREEN_FORM } from "constants/forms";
import {
@ -306,7 +305,6 @@ type ApiHomeScreenProps = {
plugins: Plugin[];
applicationId: string;
actions: ActionDataState;
createAction: (data: Partial<RestAction>) => void;
fetchProvidersWithCategory: (
request: FetchProviderWithCategoryRequest,
) => void;
@ -782,8 +780,6 @@ const mapDispatchToProps = (dispatch: any) => ({
fetchProviderCategories: () => dispatch(fetchProviderCategories()),
fetchProvidersWithCategory: (request: FetchProviderWithCategoryRequest) =>
dispatch(fetchProvidersWithCategory(request)),
createAction: (data: Partial<RestAction>) =>
dispatch(createActionRequest(data)),
searchApiOrProvider: (searchKey: string) =>
dispatch(searchApiOrProvider({ searchKey })),
createNewApiAction: (pageId: string) => dispatch(createNewApiAction(pageId)),

View File

@ -5,7 +5,6 @@ import ApiEditorForm from "./Form";
import RapidApiEditorForm from "./RapidApiEditorForm";
import ApiHomeScreen from "./ApiHomeScreen";
import {
createActionRequest,
runApiAction,
deleteAction,
updateAction,
@ -49,7 +48,6 @@ interface ReduxStateProps {
}
interface ReduxActionProps {
submitForm: (name: string) => void;
createAction: (values: RestAction) => void;
runAction: (id: string, paginationField?: PaginationField) => void;
deleteAction: (id: string, name: string) => void;
updateAction: (data: RestAction) => void;
@ -246,7 +244,6 @@ const mapStateToProps = (state: AppState, props: any): ReduxStateProps => {
const mapDispatchToProps = (dispatch: any): ReduxActionProps => ({
submitForm: (name: string) => dispatch(submit(name)),
createAction: (action: RestAction) => dispatch(createActionRequest(action)),
runAction: (id: string, paginationField?: PaginationField) =>
dispatch(runApiAction(id, paginationField)),
deleteAction: (id: string, name: string) =>

View File

@ -7,7 +7,6 @@ import { ActionDataState } from "reducers/entityReducers/actionsReducer";
import { APIEditorRouteParams } from "constants/routes";
import { ApiPaneReduxState } from "reducers/uiReducers/apiPaneReducer";
import {
createActionRequest,
moveActionRequest,
copyActionRequest,
deleteAction,
@ -66,7 +65,6 @@ interface ReduxStateProps {
}
interface ReduxDispatchProps {
createAction: (data: Partial<RestAction>) => void;
onApiChange: (id: string) => void;
initApiPane: (urlId?: string) => void;
moveAction: (
@ -213,8 +211,6 @@ const mapStateToProps = (state: AppState): ReduxStateProps => ({
});
const mapDispatchToProps = (dispatch: Function): ReduxDispatchProps => ({
createAction: (data: Partial<RestAction>) =>
dispatch(createActionRequest(data)),
onApiChange: (actionId: string) => dispatch(changeApi(actionId)),
initApiPane: (urlId?: string) => dispatch(initApiPane(urlId)),
moveAction: (