fix a ton of typescript errors

This commit is contained in:
Eduard Heimbuch
2020-01-08 13:40:07 +01:00
parent 15a9a5b09b
commit a43ffacf03
41 changed files with 229 additions and 311 deletions

View File

@@ -22,6 +22,7 @@ import {
getNamespaceStrategies,
isFetchNamespaceStrategiesPending
} from "../modules/namespaceStrategies";
import { compose } from "redux";
type Props = WithTranslation & {
loading: boolean;
@@ -137,7 +138,7 @@ class GlobalConfig extends React.Component<Props, State> {
};
}
const mapDispatchToProps = dispatch => {
const mapDispatchToProps = (dispatch: any) => {
return {
fetchConfig: (link: string) => {
dispatch(fetchConfig(link));
@@ -154,7 +155,7 @@ const mapDispatchToProps = dispatch => {
};
};
const mapStateToProps = state => {
const mapStateToProps = (state: any) => {
const loading =
isFetchConfigPending(state) || isModifyConfigPending(state) || isFetchNamespaceStrategiesPending(state);
const error =
@@ -175,7 +176,4 @@ const mapStateToProps = state => {
};
};
export default connect(
mapStateToProps,
mapDispatchToProps
)(withTranslation("config")(GlobalConfig));
export default compose(connect(mapStateToProps, mapDispatchToProps), withTranslation("config"))(GlobalConfig);