aboutsummaryrefslogtreecommitdiff
path: root/src/webex/pages/benchmark.tsx
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-04-06 23:32:01 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-04-06 23:32:01 +0530
commit47787c0b0b846d5f4a057661efdd05d8786032f1 (patch)
tree3a3d58a5ebad8af584de6a6cd882c2019f71dffa /src/webex/pages/benchmark.tsx
parentf36bb7a04eabe0330cb166bf9ce5021c92f38dc8 (diff)
downloadwallet-core-47787c0b0b846d5f4a057661efdd05d8786032f1.tar.xz
make linter less grumpy
Diffstat (limited to 'src/webex/pages/benchmark.tsx')
-rw-r--r--src/webex/pages/benchmark.tsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/webex/pages/benchmark.tsx b/src/webex/pages/benchmark.tsx
index bf4c4b04d..eb7193e0c 100644
--- a/src/webex/pages/benchmark.tsx
+++ b/src/webex/pages/benchmark.tsx
@@ -34,7 +34,7 @@ interface BenchmarkRunnerState {
running: boolean;
}
-function BenchmarkDisplay(props: BenchmarkRunnerState) {
+function BenchmarkDisplay(props: BenchmarkRunnerState): JSX.Element {
const result = props.result;
if (!result) {
if (props.running) {
@@ -55,7 +55,7 @@ function BenchmarkDisplay(props: BenchmarkRunnerState) {
{Object.keys(result.time)
.sort()
.map((k) => (
- <tr>
+ <tr key={k}>
<td>{k}</td>
<td>{result.time[k] / result.repetitions}</td>
</tr>
@@ -75,13 +75,13 @@ class BenchmarkRunner extends React.Component<any, BenchmarkRunnerState> {
};
}
- async run() {
+ async run(): Promise<void> {
this.setState({ result: undefined, running: true });
const result = await wxApi.benchmarkCrypto(this.state.repetitions);
this.setState({ result, running: false });
}
- render() {
+ render(): JSX.Element {
return (
<div>
<label>Repetitions:</label>
@@ -99,6 +99,6 @@ class BenchmarkRunner extends React.Component<any, BenchmarkRunnerState> {
}
}
-export function makeBenchmarkPage() {
+export function makeBenchmarkPage(): JSX.Element {
return <BenchmarkRunner />;
}