|
|
@@ -1,27 +1,18 @@
|
|
|
-import React, { Component } from "react";
|
|
|
+import React, { useContext } from "react";
|
|
|
|
|
|
import { Context } from "shared/Context";
|
|
|
-import ClusterList from "./ClusterList";
|
|
|
-
|
|
|
-type PropsType = {};
|
|
|
|
|
|
-type StateType = {};
|
|
|
+import ClusterList from "./ClusterList";
|
|
|
|
|
|
-// Props in context to project section to trigger update on context change
|
|
|
-export default class ClusterListContainer extends Component<
|
|
|
- PropsType,
|
|
|
- StateType
|
|
|
-> {
|
|
|
- state = {};
|
|
|
+const ClusterListContainer = (): JSX.Element => {
|
|
|
+ const context = useContext(Context);
|
|
|
|
|
|
- render() {
|
|
|
- return (
|
|
|
- <ClusterList
|
|
|
- currentProject={this.context.currentProject}
|
|
|
- projects={this.context.projects}
|
|
|
- />
|
|
|
- );
|
|
|
- }
|
|
|
-}
|
|
|
+ return (
|
|
|
+ <ClusterList
|
|
|
+ currentProject={context.currentProject}
|
|
|
+ projects={context.projects}
|
|
|
+ />
|
|
|
+ );
|
|
|
+};
|
|
|
|
|
|
-ClusterListContainer.contextType = Context;
|
|
|
+export default ClusterListContainer;
|