import React from 'react'
import { connect } from 'react-redux'
export default connect(state => state)(({ lastUpdate, light }) => {
return (
{format(new Date(lastUpdate))}
)
})
const format = t => `${pad(t.getHours())}:${pad(t.getMinutes())}:${pad(t.getSeconds())}`
const pad = n => n < 10 ? `0${n}` : n