aboutsummaryrefslogtreecommitdiff
path: root/src/webex
diff options
context:
space:
mode:
Diffstat (limited to 'src/webex')
-rw-r--r--src/webex/i18n.tsx6
-rw-r--r--src/webex/messages.ts1
-rw-r--r--src/webex/pages/popup.tsx7
3 files changed, 8 insertions, 6 deletions
diff --git a/src/webex/i18n.tsx b/src/webex/i18n.tsx
index 3f23267d5..4c111a05a 100644
--- a/src/webex/i18n.tsx
+++ b/src/webex/i18n.tsx
@@ -129,7 +129,7 @@ export class Translate extends React.Component<TranslateProps, {}> {
.ngettext(s, s, 1)
.split(/%(\d+)\$s/)
.filter((e: any, i: number) => i % 2 === 0);
- const childArray = React.Children.toArray(this.props.children!);
+ const childArray = React.Children.toArray(this.props.children);
for (let i = 0; i < childArray.length - 1; ++i) {
if (
typeof childArray[i] === "string" &&
@@ -220,7 +220,7 @@ export class TranslatePlural extends React.Component<
.ngettext(s, s, 1)
.split(/%(\d+)\$s/)
.filter((e: any, i: number) => i % 2 === 0);
- const childArray = React.Children.toArray(this.props.children!);
+ const childArray = React.Children.toArray(this.props.children);
for (let i = 0; i < childArray.length - 1; ++i) {
if (
typeof childArray[i] === "string" &&
@@ -261,7 +261,7 @@ export class TranslateSingular extends React.Component<
.ngettext(s, s, 1)
.split(/%(\d+)\$s/)
.filter((e: any, i: number) => i % 2 === 0);
- const childArray = React.Children.toArray(this.props.children!);
+ const childArray = React.Children.toArray(this.props.children);
for (let i = 0; i < childArray.length - 1; ++i) {
if (
typeof childArray[i] === "string" &&
diff --git a/src/webex/messages.ts b/src/webex/messages.ts
index 19d125a89..745e309c7 100644
--- a/src/webex/messages.ts
+++ b/src/webex/messages.ts
@@ -170,4 +170,3 @@ export interface MessageMap {
* String literal types for messages.
*/
export type MessageType = keyof MessageMap;
-
diff --git a/src/webex/pages/popup.tsx b/src/webex/pages/popup.tsx
index cdb09d444..0fd2477f6 100644
--- a/src/webex/pages/popup.tsx
+++ b/src/webex/pages/popup.tsx
@@ -40,6 +40,9 @@ import { HistoryEvent } from "../../types/history";
import moment from "moment";
import { Timestamp } from "../../util/time";
+// FIXME: move to newer react functions
+/* eslint-disable react/no-deprecated */
+
function onUpdateNotification(f: () => void): () => void {
const port = chrome.runtime.connect({ name: "notifications" });
const listener = (): void => {
@@ -290,7 +293,7 @@ class WalletBalanceView extends React.Component<any, any> {
const listing = Object.keys(wallet.byCurrency).map((key) => {
const entry: WalletBalanceEntry = wallet.byCurrency[key];
return (
- <p>
+ <p key={key}>
{bigAmount(entry.available)} {this.formatPending(entry)}
</p>
);
@@ -414,7 +417,7 @@ function amountDiff(
}
}
-function parseSummary(summary: string) {
+function parseSummary(summary: string): { item: string; merchant: string } {
const parsed = summary.split(/: (.+)/);
return {
merchant: parsed[0],