From aaf950e2ad5c07d4423f9822e3a0ae9f7b8d2bdf Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 30 Mar 2020 16:09:32 +0530 Subject: re-format with prettier v2, fix HTML --- src/webex/pages/auditors.tsx | 84 +++++++++++++++++++++++++------------------- 1 file changed, 47 insertions(+), 37 deletions(-) (limited to 'src/webex/pages/auditors.tsx') diff --git a/src/webex/pages/auditors.tsx b/src/webex/pages/auditors.tsx index 876cf326b..e2bb29af1 100644 --- a/src/webex/pages/auditors.tsx +++ b/src/webex/pages/auditors.tsx @@ -20,17 +20,13 @@ * @author Florian Dold */ - import { AuditorRecord, CurrencyRecord, ExchangeForCurrencyRecord, } from "../../types/dbTypes"; -import { - getCurrencies, - updateCurrency, -} from "../wxApi"; +import { getCurrencies, updateCurrency } from "../wxApi"; import * as React from "react"; import * as ReactDOM from "react-dom"; @@ -60,14 +56,22 @@ class CurrencyList extends React.Component<{}, CurrencyListState> { } async confirmRemoveAuditor(c: CurrencyRecord, a: AuditorRecord) { - if (window.confirm(`Do you really want to remove auditor ${a.baseUrl} for currency ${c.name}?`)) { + if ( + window.confirm( + `Do you really want to remove auditor ${a.baseUrl} for currency ${c.name}?`, + ) + ) { c.auditors = c.auditors.filter((x) => x.auditorPub !== a.auditorPub); await updateCurrency(c); } } async confirmRemoveExchange(c: CurrencyRecord, e: ExchangeForCurrencyRecord) { - if (window.confirm(`Do you really want to remove exchange ${e.baseUrl} for currency ${c.name}?`)) { + if ( + window.confirm( + `Do you really want to remove exchange ${e.baseUrl} for currency ${c.name}?`, + ) + ) { c.exchanges = c.exchanges.filter((x) => x.baseUrl !== e.baseUrl); await updateCurrency(c); } @@ -81,18 +85,21 @@ class CurrencyList extends React.Component<{}, CurrencyListState> {

Trusted Auditors:

); @@ -106,14 +113,17 @@ class CurrencyList extends React.Component<{}, CurrencyListState> {

Trusted Exchanges:

); @@ -126,16 +136,16 @@ class CurrencyList extends React.Component<{}, CurrencyListState> { } return (
- {currencies.map((c) => ( -
-

Currency {c.name}

-

Displayed with {c.fractionalDigits} fractional digits.

-

Auditors

-
{this.renderAuditors(c)}
-

Exchanges

-
{this.renderExchanges(c)}
-
- ))} + {currencies.map((c) => ( +
+

Currency {c.name}

+

Displayed with {c.fractionalDigits} fractional digits.

+

Auditors

+
{this.renderAuditors(c)}
+

Exchanges

+
{this.renderExchanges(c)}
+
+ ))}
); } -- cgit v1.2.3