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 -2
View File
@@ -3,7 +3,7 @@ import { Button, Card, Divider, Form, Image, Input, List, Space, Spin, Typograph
import LockOutlined from "@ant-design/icons/LockOutlined";
import logo from "../images/logo.png";
import PluginsContext from "./PluginsContext";
import ControlContext from "./ControlContext";
const { Paragraph, Text } = Typography;
@@ -33,7 +33,7 @@ function TokenAuth(props) {
}
export default function LoginForm(props) {
let plugins = useContext(PluginsContext);
let plugins = useContext(ControlContext).plugins;
let loginForms = [];
for (let plugin of plugins.values()) {