0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-27 02:52:43 +00:00

Add tooltip to the Time Since Last Update info <span>

This commit is contained in:
G.Ambatte
2021-08-25 18:14:13 +12:00
parent 9673a9a0f6
commit 57940bc994

View File

@@ -7,6 +7,7 @@ const moment = require('moment');
const request = require('superagent');
const googleDriveIcon = require('../../../googleDrive.png');
const { default: dedentTabs } = require('dedent-tabs');
const BrewItem = createClass({
getDefaultProps : function() {
@@ -118,7 +119,10 @@ const BrewItem = createClass({
<i className='far fa-file' /> {brew.pageCount}
</span>
}
<span>
<span title={dedentTabs(`
Created: ${moment(brew.createdAt).local().format(dateFormatString)}
Last updated: ${moment(brew.updatedAt).local().format(dateFormatString)}
`)}>
<i className='fas fa-sync-alt' /> {moment(brew.updatedAt).fromNow()}
</span>
{this.renderGoogleDriveIcon()}