Remove moment

This commit is contained in:
Tom Moor
2018-03-06 20:31:12 -08:00
parent 247dbce9b0
commit 16a6c3bffe
7 changed files with 22 additions and 259 deletions

View File

@@ -1,6 +1,6 @@
// @flow
import React, { Component } from 'react';
import moment from 'moment';
import distanceInWordsToNow from 'date-fns/distance_in_words_to_now';
import styled from 'styled-components';
import { color } from 'shared/styles/constants';
import Collection from 'models/Collection';
@@ -35,7 +35,7 @@ class PublishingInfo extends Component {
publishedAt,
} = document;
const timeAgo = moment(createdAt).fromNow();
const timeAgo = `${distanceInWordsToNow(new Date(createdAt))} ago`;
return (
<Container align="center">