Joystream Stats 3 rokov pred
rodič
commit
a6bc8cf665

+ 0 - 1
src/components/Storage/Ranking.tsx

@@ -36,7 +36,6 @@ const Ranking = (props: { location: string; providers: any[] }) => {
   const { location, providers } = props;
   const speeds = providers.map((provider) => calculateSpeed(provider));
   const sorted = speeds.sort((a, b) => b.speed - a.speed);
-  //console.log(location, sorted);
   return (
     <div className="col-3 mb-3">
       <h3>{location}</h3>

+ 14 - 2
src/components/Storage/index.tsx

@@ -10,6 +10,9 @@ import axios from "axios";
 interface IProps {
   assets: string[];
   providers: any[];
+  tokenomics: {
+    media: { channels: number; size: number; media_files: number };
+  };
 }
 interface IState {}
 
@@ -121,12 +124,21 @@ class Storage extends React.Component<IProps, IState> {
       loading,
       showTest,
     } = this.state;
-    const { providers, assets } = this.props;
+    const { providers, assets, tokenomics } = this.props;
 
     return (
       <div className="m-2 p-2 bg-light">
-        <h2>Storage Providers Ranking</h2>
+        <h2>Storage Providers</h2>
+        {tokenomics ? (
+          <div className="m-2 p-2">
+            <div>Files: {tokenomics.media.media_files}</div>
+            <div>Size: {(tokenomics.media.size / 1000000000).toFixed()} GB</div>
+          </div>
+        ) : (
+          <div />
+        )}
 
+        <h3>Ranking</h3>
         {showTest ? (
           <Test
             handleChange={this.handleChange}