Remove PluginsContext

The plugins are available as a property on the Control provided by the
ControlContext which makes the PluginsContext redundant.  Remove it and
use ControlContext to retreive the plugin list in the app.
This commit is contained in:
Hornwitser committed 2021-05-16 20:36:09 +02:00
1 parent 4014eb4ec2
commit 19ebee4697
7 files changed
+12 -16

No files matched your search

+3 -6
View File
@@ -7,7 +7,6 @@ import { logger } from "@clusterio/lib/logging";
import ErrorBoundary from "./ErrorBoundary";
import SiteLayout from "./SiteLayout";
import ControlContext from "./ControlContext";
import PluginsContext from "./PluginsContext";
import LoginForm from "./LoginForm";
import { Card, Spin, Typography } from "antd";
@@ -95,11 +94,9 @@ export default function App(props) {
return (
<ErrorBoundary Component={ErrorCard}>
<ControlContext.Provider value={props.control}>
<PluginsContext.Provider value={props.plugins}>
<BrowserRouter basename={webRoot}>
{page}
</BrowserRouter>
</PluginsContext.Provider>
<BrowserRouter basename={webRoot}>
{page}
</BrowserRouter>
</ControlContext.Provider>
</ErrorBoundary>
);