Nicer dashboard

This commit is contained in:
Jori Lallo 2016-05-19 21:03:29 -07:00
parent 4430a3129e
commit 38d06691d7
3 changed files with 22 additions and 6 deletions

View File

@ -16,7 +16,7 @@ class AtlasPreview extends React.Component {
return (
<div className={ styles.container }>
<h2><Link to={ `/atlas/${data.id}` } className={ styles.atlasLink }>{ data.name }</Link></h2>
<div>No documents. Why not <Link to={ `/atlas/${data.id}/new` }>create one</Link>?</div>
<div className={ styles.description }>No documents. Why not <Link to={ `/atlas/${data.id}/new` }>create one</Link>?</div>
</div>
);
}

View File

@ -1,6 +1,19 @@
@import '../../utils/constants.scss';
.container {
display: flex;
flex: 1;
flex-direction: column;
padding-bottom: 40px;
margin-bottom: 20px;
border-bottom: 1px solid #eee;
}
.atlasLink {
text-decoration: none;
color: $textColor;
}
.description {
color: #aaa;
}

View File

@ -3,6 +3,7 @@ import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { fetchAtlasesAsync } from 'actions/AtlasActions';
import Flex from 'components/Flex';
import Layout from 'components/Layout';
import AtlasPreview from 'components/AtlasPreview';
import AtlasPreviewLoading from 'components/AtlasPreviewLoading';
@ -22,11 +23,13 @@ class Dashboard extends React.Component {
return (
<Layout>
<CenteredContent>
{ this.props.isLoading ? (
<AtlasPreviewLoading />
) : this.props.items.map((item) => {
return (<AtlasPreview data={ item } />);
}) }
<Flex direction="column" flex={ true }>
{ this.props.isLoading ? (
<AtlasPreviewLoading />
) : this.props.items.map((item) => {
return (<AtlasPreview data={ item } />);
}) }
</Flex>
</CenteredContent>
</Layout>
);