diff options
author | Michael Muré <batolettre@gmail.com> | 2018-08-15 21:49:31 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-08-15 21:49:31 +0200 |
commit | cf9e83e74dc5f91b0e13fbdb79848925e68809a3 (patch) | |
tree | e3b832cf0f5f6e4f4756f4e757babda22d9091e0 /webui/src/Date.js | |
parent | 1984d4343db770fc2c8e251a81f1ab997a4c4d5e (diff) | |
download | git-bug-cf9e83e74dc5f91b0e13fbdb79848925e68809a3.tar.gz |
webui: display label changes in the timeline + cleaning evrywhere
Diffstat (limited to 'webui/src/Date.js')
-rw-r--r-- | webui/src/Date.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/webui/src/Date.js b/webui/src/Date.js new file mode 100644 index 00000000..b20fd274 --- /dev/null +++ b/webui/src/Date.js @@ -0,0 +1,11 @@ +import Tooltip from '@material-ui/core/Tooltip/Tooltip' +import * as moment from 'moment' +import React from 'react' + +const Date = ({date}) => ( + <Tooltip title={moment(date).format('MMMM D, YYYY, h:mm a')}> + <span> {moment(date).fromNow()} </span> + </Tooltip> +) + +export default Date |