Files
outline/frontend/scenes/Starred/Starred.js
Tom Moor 1bef5ddccb Dashboard loading (#142)
* Fixed: Loading indicator never appears
Added: Loading indicator to dashboard when loading first results

* Less assumptions

* Fixes: Image uploads not working

* Fixes #136 - Keyboard shortcuts should work when editor is not focused

* Allow images to be dragged anywhere on document editor

* Fixes #137 - vertical alignment

* Restore shortcuts with editor focus

* Restore 'e' to edit current document
Fixed up ? to open keyboard shortcuts

* wip

* LoadinglistPlaceholder

* WIP

* Refactor

* DRY logic
2017-07-17 21:46:32 -07:00

34 lines
926 B
JavaScript

// @flow
import React, { Component } from 'react';
import { observer, inject } from 'mobx-react';
import CenteredContent from 'components/CenteredContent';
import { ListPlaceholder } from 'components/LoadingPlaceholder';
import PageTitle from 'components/PageTitle';
import DocumentList from 'components/DocumentList';
import DocumentsStore from 'stores/DocumentsStore';
@observer class Starred extends Component {
props: {
documents: DocumentsStore,
};
componentDidMount() {
this.props.documents.fetchStarred();
}
render() {
const { isLoaded, isFetching } = this.props.documents;
return (
<CenteredContent column auto>
<PageTitle title="Starred" />
<h1>Starred</h1>
{!isLoaded && isFetching && <ListPlaceholder />}
<DocumentList documents={this.props.documents.starred} />
</CenteredContent>
);
}
}
export default inject('documents')(Starred);