diff --git a/scm-ui/src/containers/PluginLoader.js b/scm-ui/src/containers/PluginLoader.js index ecc287b743..e7aeff69c2 100644 --- a/scm-ui/src/containers/PluginLoader.js +++ b/scm-ui/src/containers/PluginLoader.js @@ -1,15 +1,10 @@ // @flow import * as React from "react"; import { apiClient, Loading } from "@scm-manager/ui-components"; -import { - callFetchIndexResources, - getUiPluginsLink -} from "../modules/indexResource"; -import { connect } from "react-redux"; +import { callFetchIndexResources } from "../modules/indexResource"; type Props = { - children: React.Node, - link: string + children: React.Node }; type State = { @@ -42,8 +37,8 @@ class PluginLoader extends React.Component { }); } - getPlugins = (link: string) => { - apiClient + getPlugins = (link: string): Promise => { + return apiClient .get(link) .then(response => response.text()) .then(JSON.parse) @@ -101,14 +96,4 @@ class PluginLoader extends React.Component { } } -const mapStateToProps = state => { - const link = getUiPluginsLink(state); - return { - link - }; -}; - -export default connect( - mapStateToProps, - null -)(PluginLoader); +export default PluginLoader;