From dd7a68fa02c092f94f581a4320b8ba48032d2f3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maren=20S=C3=BCwer?= Date: Thu, 11 Oct 2018 11:40:04 +0200 Subject: [PATCH] solve reloading problem --- scm-ui/src/containers/PluginLoader.js | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) 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;