diff --git a/js/src/common/utils/liveHumanTimes.js b/js/src/common/utils/liveHumanTimes.ts similarity index 53% rename from js/src/common/utils/liveHumanTimes.js rename to js/src/common/utils/liveHumanTimes.ts index 2eac7ef9d..cea16fde5 100644 --- a/js/src/common/utils/liveHumanTimes.js +++ b/js/src/common/utils/liveHumanTimes.ts @@ -1,18 +1,18 @@ -import humanTimeUtil from './humanTime'; +import humanTime from './humanTime'; function updateHumanTimes() { $('[data-humantime]').each(function () { const $this = $(this); - const ago = humanTimeUtil($this.attr('datetime')); + const ago = humanTime($this.attr('datetime')); $this.html(ago); }); } /** - * The `humanTime` initializer sets up a loop every 1 second to update + * The `liveHumanTimes` initializer sets up a loop every 1 second to update * timestamps rendered with the `humanTime` helper. */ -export default function humanTime() { +export default function liveHumanTimes() { setInterval(updateHumanTimes, 10000); }