Skip to content

Commit

Permalink
Fixes #27964 - Reset pagination on sync success (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
xprazak2 authored and ares committed Oct 10, 2019
1 parent 9896f26 commit a9d3bf3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions webpack/components/NewTemplateSync/NewTemplateSyncActions.js
Expand Up @@ -5,13 +5,20 @@ import {
SYNC_SETTINGS_REQUEST,
SYNC_SETTINGS_SUCCESS,
SYNC_SETTINGS_FAILURE,
SYNC_RESULT_PAGINATION_CHANGE,
} from '../../consts';

import { initialState } from '../TemplateSyncResult/TemplateSyncResultReducer';

export const getSyncSettings = url => async dispatch => {
dispatch({ type: SYNC_SETTINGS_REQUEST });

try {
const { data } = await api.get(url);
dispatch({
type: SYNC_RESULT_PAGINATION_CHANGE,
payload: { pagination: initialState.pagination },
});
return dispatch({
type: SYNC_SETTINGS_SUCCESS,
payload: {
Expand Down

0 comments on commit a9d3bf3

Please sign in to comment.