mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-22 22:16:13 -04:00
Convert Form Components to TypeScript
This commit is contained in:
@@ -55,10 +55,19 @@ export const actionHandlers = handleThunks({
|
||||
payload
|
||||
};
|
||||
|
||||
dispatch(set({
|
||||
section: subsection,
|
||||
isFetching: true
|
||||
}));
|
||||
// Subsection might not yet be defined
|
||||
if (getState()[section][payload.section]) {
|
||||
dispatch(set({
|
||||
section: subsection,
|
||||
isFetching: true
|
||||
}));
|
||||
} else {
|
||||
dispatch(set({
|
||||
section: subsection,
|
||||
...defaultState,
|
||||
isFetching: true
|
||||
}));
|
||||
}
|
||||
|
||||
const promise = requestAction(payload);
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { createSelector } from 'reselect';
|
||||
import AppState from 'App/State/AppState';
|
||||
import getSectionState from 'Utilities/State/getSectionState';
|
||||
|
||||
function createSortedSectionSelector<T>(
|
||||
@@ -6,7 +7,7 @@ function createSortedSectionSelector<T>(
|
||||
comparer: (a: T, b: T) => number
|
||||
) {
|
||||
return createSelector(
|
||||
(state) => state,
|
||||
(state: AppState) => state,
|
||||
(state) => {
|
||||
const sectionState = getSectionState(state, section, true);
|
||||
|
||||
|
||||
@@ -10,6 +10,11 @@ function getValidationFailures(saveError) {
|
||||
|
||||
function mapFailure(failure) {
|
||||
return {
|
||||
errorMessage: failure.errorMessage,
|
||||
infoLink: failure.infoLink,
|
||||
detailedDescription: failure.detailedDescription,
|
||||
|
||||
// TODO: Remove these renamed properties
|
||||
message: failure.errorMessage,
|
||||
link: failure.infoLink,
|
||||
detailedMessage: failure.detailedDescription
|
||||
|
||||
Reference in New Issue
Block a user