diff options
| -rw-r--r-- | client/app.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/client/app.js b/client/app.js index 7635162..8a07f34 100644 --- a/client/app.js +++ b/client/app.js @@ -54,11 +54,13 @@ export default class PhashApp extends Component { } render() { + const { res } = this.state return ( <div className='app'> <h1>Search by Image</h1> {this.renderQuery()} {this.renderResults()} + {this.renderTiming()} </div> ) } @@ -142,4 +144,12 @@ export default class PhashApp extends Component { </div> ) } + + renderTiming() { + const { res } = this.state + if (res && res.timing) { + return <small>Query completed in {Math.round(res.timing * 1000)} ms</small> + } + return null + } }
\ No newline at end of file |
