diff --git a/src/components/AtlasPreview/AtlasPreview.js b/src/components/AtlasPreview/AtlasPreview.js index 9b9aaec5..fed97671 100644 --- a/src/components/AtlasPreview/AtlasPreview.js +++ b/src/components/AtlasPreview/AtlasPreview.js @@ -1,4 +1,5 @@ import React from 'react'; +import moment from 'moment'; import Link from 'react-router/lib/Link'; import styles from './AtlasPreview.scss'; @@ -16,7 +17,17 @@ class AtlasPreview extends React.Component { return (

{ data.name }

-
No documents. Why not create one?
+ { data.recentDocuments.length > 0 ? + data.recentDocuments.map(document => { + return ( + +

{ document.title }

+ { moment(document.updatedAt).fromNow() } + ) + }) + : ( +
No documents. Why not create one?
+ ) }
); } diff --git a/src/components/AtlasPreview/AtlasPreview.scss b/src/components/AtlasPreview/AtlasPreview.scss index 56f0cbfb..170da636 100644 --- a/src/components/AtlasPreview/AtlasPreview.scss +++ b/src/components/AtlasPreview/AtlasPreview.scss @@ -16,4 +16,26 @@ .description { color: #aaa; +} + +.documentPreview { + display: flex; + flex: 1; + justify-content: space-between; + + margin-bottom: 20px; + text-decoration: none; + + h3 { + font-weight: normal; + font-size: 15px; + color: $textColor; + + margin: 0; + } + + span { + font-size: 13px; + color: #ccc; + } } \ No newline at end of file diff --git a/src/scenes/Dashboard/Dashboard.js b/src/scenes/Dashboard/Dashboard.js index f5f89590..4944e844 100644 --- a/src/scenes/Dashboard/Dashboard.js +++ b/src/scenes/Dashboard/Dashboard.js @@ -27,7 +27,7 @@ class Dashboard extends React.Component { { this.props.isLoading ? ( ) : this.props.items.map((item) => { - return (); + return (); }) }