mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-29 23:12:39 +01:00
Cleanup old prop-types for TS
This commit is contained in:
parent
d713b83a36
commit
2d237ae6b7
@ -51,7 +51,7 @@ function HistoryDetailsModal(props: HistoryDetailsModalProps) {
|
|||||||
sourceTitle,
|
sourceTitle,
|
||||||
data,
|
data,
|
||||||
downloadId,
|
downloadId,
|
||||||
isMarkingAsFailed,
|
isMarkingAsFailed = false,
|
||||||
shortDateFormat,
|
shortDateFormat,
|
||||||
timeFormat,
|
timeFormat,
|
||||||
onMarkAsFailedPress,
|
onMarkAsFailedPress,
|
||||||
@ -93,8 +93,4 @@ function HistoryDetailsModal(props: HistoryDetailsModalProps) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
HistoryDetailsModal.defaultProps = {
|
|
||||||
isMarkingAsFailed: false,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default HistoryDetailsModal;
|
export default HistoryDetailsModal;
|
||||||
|
@ -61,7 +61,7 @@ function HistoryRow(props: HistoryRowProps) {
|
|||||||
date,
|
date,
|
||||||
data,
|
data,
|
||||||
downloadId,
|
downloadId,
|
||||||
isMarkingAsFailed,
|
isMarkingAsFailed = false,
|
||||||
markAsFailedError,
|
markAsFailedError,
|
||||||
columns,
|
columns,
|
||||||
} = props;
|
} = props;
|
||||||
@ -268,8 +268,4 @@ function HistoryRow(props: HistoryRowProps) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
HistoryRow.defaultProps = {
|
|
||||||
customFormats: [],
|
|
||||||
};
|
|
||||||
|
|
||||||
export default HistoryRow;
|
export default HistoryRow;
|
||||||
|
@ -155,10 +155,4 @@ function QueueStatus(props: QueueStatusProps) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
QueueStatus.defaultProps = {
|
|
||||||
trackedDownloadStatus: 'ok',
|
|
||||||
trackedDownloadState: 'downloading',
|
|
||||||
canFlip: false,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default QueueStatus;
|
export default QueueStatus;
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { ConnectedRouter, ConnectedRouterProps } from 'connected-react-router';
|
import { ConnectedRouter, ConnectedRouterProps } from 'connected-react-router';
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import DocumentTitle from 'react-document-title';
|
import DocumentTitle from 'react-document-title';
|
||||||
import { Provider } from 'react-redux';
|
import { Provider } from 'react-redux';
|
||||||
@ -20,7 +19,7 @@ function App({ store, history }: AppProps) {
|
|||||||
<ConnectedRouter history={history}>
|
<ConnectedRouter history={history}>
|
||||||
<ApplyTheme />
|
<ApplyTheme />
|
||||||
<PageConnector>
|
<PageConnector>
|
||||||
<AppRoutes app={App} />
|
<AppRoutes />
|
||||||
</PageConnector>
|
</PageConnector>
|
||||||
</ConnectedRouter>
|
</ConnectedRouter>
|
||||||
</Provider>
|
</Provider>
|
||||||
@ -28,9 +27,4 @@ function App({ store, history }: AppProps) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
App.propTypes = {
|
|
||||||
store: PropTypes.object.isRequired,
|
|
||||||
history: PropTypes.object.isRequired,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default App;
|
export default App;
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import PropTypes from 'prop-types';
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Redirect, Route } from 'react-router-dom';
|
import { Redirect, Route } from 'react-router-dom';
|
||||||
import Blocklist from 'Activity/Blocklist/Blocklist';
|
import Blocklist from 'Activity/Blocklist/Blocklist';
|
||||||
@ -165,8 +164,4 @@ function AppRoutes() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
AppRoutes.propTypes = {
|
|
||||||
app: PropTypes.func.isRequired,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default AppRoutes;
|
export default AppRoutes;
|
||||||
|
@ -8,15 +8,15 @@ import AppSectionState, { AppSectionItemState } from './AppSectionState';
|
|||||||
export type DiskSpaceAppState = AppSectionState<DiskSpace>;
|
export type DiskSpaceAppState = AppSectionState<DiskSpace>;
|
||||||
export type HealthAppState = AppSectionState<Health>;
|
export type HealthAppState = AppSectionState<Health>;
|
||||||
export type SystemStatusAppState = AppSectionItemState<SystemStatus>;
|
export type SystemStatusAppState = AppSectionItemState<SystemStatus>;
|
||||||
export type UpdateAppState = AppSectionState<Update>;
|
|
||||||
export type TaskAppState = AppSectionState<Task>;
|
export type TaskAppState = AppSectionState<Task>;
|
||||||
|
export type UpdateAppState = AppSectionState<Update>;
|
||||||
|
|
||||||
interface SystemAppState {
|
interface SystemAppState {
|
||||||
diskSpace: DiskSpaceAppState;
|
diskSpace: DiskSpaceAppState;
|
||||||
health: HealthAppState;
|
health: HealthAppState;
|
||||||
updates: UpdateAppState;
|
|
||||||
status: SystemStatusAppState;
|
status: SystemStatusAppState;
|
||||||
tasks: TaskAppState;
|
tasks: TaskAppState;
|
||||||
|
updates: UpdateAppState;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default SystemAppState;
|
export default SystemAppState;
|
||||||
|
@ -26,7 +26,7 @@ export interface CommandBody {
|
|||||||
seriesId?: number;
|
seriesId?: number;
|
||||||
seriesIds?: number[];
|
seriesIds?: number[];
|
||||||
seasonNumber?: number;
|
seasonNumber?: number;
|
||||||
[key: string]: string | number | boolean | undefined | number[] | undefined;
|
[key: string]: string | number | boolean | number[] | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Command extends ModelBase {
|
interface Command extends ModelBase {
|
||||||
|
@ -46,9 +46,9 @@ function SeriesTypeSelectInput(props: SeriesTypeSelectInputProps) {
|
|||||||
const values = [...seriesTypeOptions];
|
const values = [...seriesTypeOptions];
|
||||||
|
|
||||||
const {
|
const {
|
||||||
includeNoChange,
|
includeNoChange = false,
|
||||||
includeNoChangeDisabled = true,
|
includeNoChangeDisabled = true,
|
||||||
includeMixed,
|
includeMixed = false,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
if (includeNoChange) {
|
if (includeNoChange) {
|
||||||
@ -77,9 +77,4 @@ function SeriesTypeSelectInput(props: SeriesTypeSelectInputProps) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
SeriesTypeSelectInput.defaultProps = {
|
|
||||||
includeNoChange: false,
|
|
||||||
includeMixed: false,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default SeriesTypeSelectInput;
|
export default SeriesTypeSelectInput;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import React, { Component } from 'react';
|
import React from 'react';
|
||||||
import PageContent from 'Components/Page/PageContent';
|
import PageContent from 'Components/Page/PageContent';
|
||||||
import PageContentBody from 'Components/Page/PageContentBody';
|
import PageContentBody from 'Components/Page/PageContentBody';
|
||||||
import translate from 'Utilities/String/translate';
|
import translate from 'Utilities/String/translate';
|
||||||
@ -7,11 +7,7 @@ import DiskSpace from './DiskSpace/DiskSpace';
|
|||||||
import Health from './Health/Health';
|
import Health from './Health/Health';
|
||||||
import MoreInfo from './MoreInfo/MoreInfo';
|
import MoreInfo from './MoreInfo/MoreInfo';
|
||||||
|
|
||||||
class Status extends Component {
|
function Status() {
|
||||||
//
|
|
||||||
// Render
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (
|
return (
|
||||||
<PageContent title={translate('Status')}>
|
<PageContent title={translate('Status')}>
|
||||||
<PageContentBody>
|
<PageContentBody>
|
||||||
@ -23,6 +19,5 @@ class Status extends Component {
|
|||||||
</PageContent>
|
</PageContent>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
export default Status;
|
export default Status;
|
||||||
|
Loading…
Reference in New Issue
Block a user