|
@@ -1,14 +1,24 @@
|
|
import React from "react";
|
|
import React from "react";
|
|
import SubBlock from "./ui/SubBlock";
|
|
import SubBlock from "./ui/SubBlock";
|
|
import Line from "./ui/Line";
|
|
import Line from "./ui/Line";
|
|
|
|
+import { ElectedCouncil } from "@/queries";
|
|
|
|
+import { useValidation } from "@/hooks";
|
|
|
|
|
|
-const Validation = (props: {}) => {
|
|
|
|
|
|
+const Validation = (props: { council: ElectedCouncil | undefined }) => {
|
|
|
|
+ const { council } = props;
|
|
|
|
+ const { validator, stake, mint, loading, error } = useValidation({ council });
|
|
|
|
+
|
|
|
|
+ console.log("validation", validator, stake, mint, loading)
|
|
|
|
|
|
return (
|
|
return (
|
|
<SubBlock title="Validation">
|
|
<SubBlock title="Validation">
|
|
- <Line content={"count"} value={5} />
|
|
|
|
- <Line content={"minted"} value={100} />
|
|
|
|
- <Line content={"staked"} value={99093123} />
|
|
|
|
|
|
+ { !loading && (
|
|
|
|
+ <>
|
|
|
|
+ <Line content={"count"} value={validator} />
|
|
|
|
+ <Line content={"minted"} value={mint} />
|
|
|
|
+ <Line content={"staked"} value={stake} />
|
|
|
|
+ </>
|
|
|
|
+ )}
|
|
</SubBlock>
|
|
</SubBlock>
|
|
);
|
|
);
|
|
};
|
|
};
|