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

@@ -2,14 +2,14 @@ import React, { useEffect, useContext, useState } from "react";
import { useHistory, useParams } from "react-router-dom";
import { Alert, Descriptions, Spin } from "antd";
import PluginsContext from "./PluginsContext";
import ControlContext from "./ControlContext";
import PageLayout from "./PageLayout";
import { notifyErrorHandler } from "../util/notify";
export default function PluginViewPage() {
let params = useParams();
let plugins = useContext(PluginsContext);
let plugins = useContext(ControlContext).plugins;
let [pluginList, setPluginList] = useState(null);
let pluginName = params.name;