summaryrefslogtreecommitdiff
path: root/client/components/timing.component.js
blob: 7473a5160c7ed266837c7da583d46143902209e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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)