diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-04-28 15:54:41 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-04-28 15:54:41 +0200 |
| commit | aa5638a1c31ce56d59696580f33733dcf0d7764c (patch) | |
| tree | c2d1bd0e480b9bae113ce9af706927c5b7c55952 /client/components/timing.component.js | |
| parent | a72ecc91db39ac5a2d60aefc6d767da457500dde (diff) | |
refactor frontend, add threshold slider
Diffstat (limited to 'client/components/timing.component.js')
| -rw-r--r-- | client/components/timing.component.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/client/components/timing.component.js b/client/components/timing.component.js new file mode 100644 index 0000000..7473a51 --- /dev/null +++ b/client/components/timing.component.js @@ -0,0 +1,13 @@ +import React from 'react' +import { connect } from 'react-redux' + +function Timing({ timing }) { + if (timing) { + return <small>Query completed in {Math.round(timing * 1000)} ms</small> + } + return null +} + +const mapStateToProps = state => state.api + +export default connect(mapStateToProps)(Timing) |
