Clean store fields, move from state.ui to state.app those that make sense

This commit is contained in:
Franc Camps-Febrer
2018-12-06 13:16:40 +00:00
parent fe6922d8fb
commit 89a7290dbf
14 changed files with 90 additions and 119 deletions

View File

@@ -1,5 +1,9 @@
import copy from '../js/data/copy.json';
import {isNotNullNorUndefined} from '../js/utilities';
import {
isNotNullNorUndefined,
parseDate,
formatterWithYear
} from '../js/utilities';
import React from 'react';
import Spinner from './presentational/Spinner';
@@ -35,8 +39,8 @@ class Card extends React.Component {
makeTimelabel(timestamp) {
if (timestamp === null) return null;
const parsedTimestamp = this.props.tools.parser(timestamp);
const timelabel = this.props.tools.formatterWithYear(parsedTimestamp);
const parsedTimestamp = parseDate(timestamp);
const timelabel = formatterWithYear(parsedTimestamp);
return timelabel;
}