mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-20 07:43:12 +09:00
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:
1 parent
4014eb4ec2
commit
19ebee4697
7 files changed
+12
-16
No files matched your search
@@ -7,7 +7,7 @@ import webUiPackage from "../../package.json";
|
||||
import { useAccount } from "../model/account";
|
||||
import ErrorBoundary from "./ErrorBoundary";
|
||||
import ErrorPage from "./ErrorPage";
|
||||
import PluginsContext from "./PluginsContext";
|
||||
import ControlContext from "./ControlContext";
|
||||
import { pages } from "../pages";
|
||||
|
||||
const { Header, Sider } = Layout;
|
||||
@@ -17,7 +17,7 @@ export default function SiteLayout(props) {
|
||||
let history = useHistory();
|
||||
let [currentSidebarPath, setCurrentSidebarPath] = useState(null);
|
||||
let account = useAccount();
|
||||
let plugins = useContext(PluginsContext);
|
||||
let plugins = useContext(ControlContext).plugins;
|
||||
|
||||
function SetSidebar(setSidebarProps) {
|
||||
useEffect(() => {
|
||||
|
||||
Reference in new issue
Block a user