aboutsummaryrefslogblamecommitdiffstats
path: root/webui/src/Date.js
blob: 46741924a2f0383721cdcadcefd861e97f9a3804 (plain) (tree)
1
2
3
4
5
6
7
8
9


                                                        
 
                            


                                                               
  
 
                    
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;