aboutsummaryrefslogblamecommitdiffstats
path: root/webui/src/Date.tsx
blob: 9380d2fcfa66f910d1886011ad308d077c2c1144 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                        
                            
                          
 

                                   


                                                               
  
 
                    
import Tooltip from '@material-ui/core/Tooltip/Tooltip';
import moment from 'moment';
import React from 'react';

type Props = { date: string };
const Date = ({ date }: Props) => (
  <Tooltip title={moment(date).format('MMMM D, YYYY, h:mm a')}>
    <span> {moment(date).fromNow()} </span>
  </Tooltip>
);

export default Date;