mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-18 21:35:27 -04:00
Use react-query for renaming
This commit is contained in:
@@ -2,7 +2,6 @@ import * as captcha from './captchaActions';
|
||||
import * as importSeries from './importSeriesActions';
|
||||
import * as interactiveImportActions from './interactiveImportActions';
|
||||
import * as oAuth from './oAuthActions';
|
||||
import * as organizePreview from './organizePreviewActions';
|
||||
import * as providerOptions from './providerOptionActions';
|
||||
import * as settings from './settingsActions';
|
||||
|
||||
@@ -11,7 +10,6 @@ export default [
|
||||
importSeries,
|
||||
interactiveImportActions,
|
||||
oAuth,
|
||||
organizePreview,
|
||||
providerOptions,
|
||||
settings
|
||||
];
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
import { createAction } from 'redux-actions';
|
||||
import { createThunk, handleThunks } from 'Store/thunks';
|
||||
import createFetchHandler from './Creators/createFetchHandler';
|
||||
import createHandleActions from './Creators/createHandleActions';
|
||||
|
||||
//
|
||||
// Variables
|
||||
|
||||
export const section = 'organizePreview';
|
||||
|
||||
//
|
||||
// State
|
||||
|
||||
export const defaultState = {
|
||||
isFetching: false,
|
||||
isPopulated: false,
|
||||
error: null,
|
||||
items: []
|
||||
};
|
||||
|
||||
//
|
||||
// Actions Types
|
||||
|
||||
export const FETCH_ORGANIZE_PREVIEW = 'organizePreview/fetchOrganizePreview';
|
||||
export const CLEAR_ORGANIZE_PREVIEW = 'organizePreview/clearOrganizePreview';
|
||||
|
||||
//
|
||||
// Action Creators
|
||||
|
||||
export const fetchOrganizePreview = createThunk(FETCH_ORGANIZE_PREVIEW);
|
||||
export const clearOrganizePreview = createAction(CLEAR_ORGANIZE_PREVIEW);
|
||||
|
||||
//
|
||||
// Action Handlers
|
||||
|
||||
export const actionHandlers = handleThunks({
|
||||
|
||||
[FETCH_ORGANIZE_PREVIEW]: createFetchHandler('organizePreview', '/rename')
|
||||
|
||||
});
|
||||
|
||||
//
|
||||
// Reducers
|
||||
|
||||
export const reducers = createHandleActions({
|
||||
|
||||
[CLEAR_ORGANIZE_PREVIEW]: (state) => {
|
||||
return Object.assign({}, state, defaultState);
|
||||
}
|
||||
|
||||
}, defaultState, section);
|
||||
Reference in New Issue
Block a user