1
0
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:
Mark McDowall
2024-10-26 14:54:23 -07:00
committed by GitHub
parent c114e2ddb7
commit 682d2b4e1b
158 changed files with 5225 additions and 6112 deletions
@@ -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