Renames
This commit is contained in:
@ -1,3 +0,0 @@
|
||||
// @flow
|
||||
import AtlasPreview from './AtlasPreview';
|
||||
export default AtlasPreview;
|
@ -1,3 +0,0 @@
|
||||
// @flow
|
||||
import AtlasPreviewLoading from './AtlasPreviewLoading';
|
||||
export default AtlasPreviewLoading;
|
@ -5,11 +5,11 @@ import { Link } from 'react-router-dom';
|
||||
|
||||
import DocumentLink from './components/DocumentLink';
|
||||
|
||||
import styles from './AtlasPreview.scss';
|
||||
import styles from './Collection.scss';
|
||||
// import classNames from 'classnames/bind';
|
||||
// const cx = classNames.bind(styles);
|
||||
|
||||
@observer class AtlasPreview extends React.Component {
|
||||
@observer class Collection extends React.Component {
|
||||
static propTypes = {
|
||||
data: React.PropTypes.object.isRequired,
|
||||
};
|
||||
@ -37,4 +37,4 @@ import styles from './AtlasPreview.scss';
|
||||
}
|
||||
}
|
||||
|
||||
export default AtlasPreview;
|
||||
export default Collection;
|
3
frontend/components/Collection/index.js
Normal file
3
frontend/components/Collection/index.js
Normal file
@ -0,0 +1,3 @@
|
||||
// @flow
|
||||
import Collection from './Collection';
|
||||
export default Collection;
|
3
frontend/components/PreviewLoading/index.js
Normal file
3
frontend/components/PreviewLoading/index.js
Normal file
@ -0,0 +1,3 @@
|
||||
// @flow
|
||||
import PreviewLoading from './PreviewLoading';
|
||||
export default PreviewLoading;
|
@ -9,7 +9,7 @@ import _ from 'lodash';
|
||||
import store from './AtlasStore';
|
||||
|
||||
import Layout, { Title } from 'components/Layout';
|
||||
import AtlasPreviewLoading from 'components/AtlasPreviewLoading';
|
||||
import PreviewLoading from 'components/PreviewLoading';
|
||||
import CenteredContent from 'components/CenteredContent';
|
||||
import DocumentList from 'components/DocumentList';
|
||||
import Divider from 'components/Divider';
|
||||
@ -86,7 +86,7 @@ class Atlas extends React.Component {
|
||||
transitionLeaveTimeout={0}
|
||||
>
|
||||
{store.isFetching
|
||||
? <AtlasPreviewLoading />
|
||||
? <PreviewLoading />
|
||||
: collection &&
|
||||
<div className={styles.container}>
|
||||
<div className={styles.atlasDetails}>
|
||||
|
@ -7,8 +7,8 @@ import { Flex } from 'reflexbox';
|
||||
import DashboardStore from './DashboardStore';
|
||||
|
||||
import Layout from 'components/Layout';
|
||||
import AtlasPreview from 'components/AtlasPreview';
|
||||
import AtlasPreviewLoading from 'components/AtlasPreviewLoading';
|
||||
import Collection from 'components/Collection';
|
||||
import PreviewLoading from 'components/PreviewLoading';
|
||||
import CenteredContent from 'components/CenteredContent';
|
||||
|
||||
type Props = {
|
||||
@ -34,22 +34,18 @@ class Dashboard extends React.Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Flex auto>
|
||||
<Layout>
|
||||
<CenteredContent>
|
||||
<Flex column auto>
|
||||
{this.store.isFetching
|
||||
? <AtlasPreviewLoading />
|
||||
? <PreviewLoading />
|
||||
: this.store.collections &&
|
||||
this.store.collections.map(collection => {
|
||||
return (
|
||||
<AtlasPreview key={collection.id} data={collection} />
|
||||
);
|
||||
})}
|
||||
this.store.collections.map(collection => (
|
||||
<Collection key={collection.id} data={collection} />
|
||||
))}
|
||||
</Flex>
|
||||
</CenteredContent>
|
||||
</Layout>
|
||||
</Flex>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import Menu from './components/Menu';
|
||||
import Editor from 'components/Editor';
|
||||
import Layout, { HeaderAction, SaveAction } from 'components/Layout';
|
||||
import PublishingInfo from 'components/PublishingInfo';
|
||||
import AtlasPreviewLoading from 'components/AtlasPreviewLoading';
|
||||
import PreviewLoading from 'components/PreviewLoading';
|
||||
import CenteredContent from 'components/CenteredContent';
|
||||
|
||||
const DISCARD_CHANGES = `
|
||||
@ -138,7 +138,7 @@ type Props = {
|
||||
<Prompt when={this.store.hasPendingChanges} message={DISCARD_CHANGES} />
|
||||
{this.store.isFetching &&
|
||||
<CenteredContent>
|
||||
<AtlasPreviewLoading />
|
||||
<PreviewLoading />
|
||||
</CenteredContent>}
|
||||
{this.store.document &&
|
||||
<Container>
|
||||
|
Reference in New Issue
Block a user