Prechádzať zdrojové kódy

20230405: fixed block and timestamp in Rounding

mkbeefcake 1 rok pred
rodič
commit
3504f663e4
1 zmenil súbory, kde vykonal 4 pridanie a 4 odobranie
  1. 4 4
      src/components/Spending/Round/index.tsx

+ 4 - 4
src/components/Spending/Round/index.tsx

@@ -2,7 +2,7 @@ import { mJoy, formatDate, sortDesc, fixGroupName } from "../../../lib/util";
 import Groups from "../Groups";
 
 const Round = (props: {}) => {
-  const { round, electedAtTime, electedAtBlock, endedAtTime, endedAtBlock } =
+  const { round, electedAt, endedAt} =
     props;
   const [
     wgSpending,
@@ -31,11 +31,11 @@ const Round = (props: {}) => {
     <div className="box text-left">
       <h1>Council #{round}</h1>
       <div>
-        elected: {formatDate(electedAtTime)} ({electedAtBlock})
+        elected: {formatDate(electedAt.timestamp)} ({electedAt.number})
       </div>
-      {endedAtBlock ? (
+      {endedAt ? (
         <div>
-          ended: {formatDate(endedAtTime)} ({endedAtBlock})
+          ended: {formatDate(endedAt.timestamp)} ({endedAt.number})
         </div>
       ) : (
         ""