Store the pausedAt state in the app URL.

This commit is contained in:
Filip Barl
2017-11-01 18:31:26 +01:00
parent 893537ca5c
commit 4bd7fc759a
11 changed files with 65 additions and 40 deletions

View File

@@ -104,13 +104,12 @@ export function humanizedRoundedDownDuration(duration) {
// that matches the `dataType` of the field. You must return an Object
// with the keys `value` and `title` defined.
// `referenceTimestamp` is the timestamp we've time-travelled to.
export function formatDataType(field, referenceTimestampStr = null) {
export function formatDataType(field, referenceTimestamp = null) {
const formatters = {
datetime(timestampString) {
const timestamp = moment(timestampString);
const referenceTimestamp = referenceTimestampStr ? moment(referenceTimestampStr) : moment();
return {
value: timestamp.from(referenceTimestamp),
value: timestamp.from(referenceTimestamp ? moment(referenceTimestamp) : moment()),
title: timestamp.utc().toISOString()
};
},