From e8bec33231a620579ccd1acd30824fd6c3a13dc2 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 28 Mar 2017 09:47:22 +0200 Subject: add auditor editing --- src/pages/auditors.tsx | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) (limited to 'src/pages/auditors.tsx') diff --git a/src/pages/auditors.tsx b/src/pages/auditors.tsx index b0bce8fd5..7cffec403 100644 --- a/src/pages/auditors.tsx +++ b/src/pages/auditors.tsx @@ -62,28 +62,39 @@ class CurrencyList extends React.Component { } } + renderAuditors(c: CurrencyRecord): any { + if (c.auditors.length == 0) { + return

No trusted auditors for this currency.

+ } + return ( +
+

Trusted Auditors:

+
    + {c.auditors.map(a => ( +
  • {a.baseUrl} +
      +
    • valid until {new Date(a.expirationStamp).toString()}
    • +
    • public key {a.auditorPub}
    • +
    +
  • + ))} +
+
+ ); + } + render(): JSX.Element { let currencies = this.state.currencies; if (!currencies) { return ...; } return ( -
+
{currencies.map(c => (

Currency {c.name}

Displayed with {c.fractionalDigits} fractional digits.

-

Auditors:

-
    - {c.auditors.map(a => ( -
  • {a.baseUrl} () -
      -
    • valid until {new Date(a.expirationStamp).toString()}
    • -
    • public key {a.auditorPub}
    • -
    -
  • - ))} -
+
{this.renderAuditors(c)}
))}
-- cgit v1.2.3