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 DocumentLink from './components/DocumentLink';
|
||||||
|
|
||||||
import styles from './AtlasPreview.scss';
|
import styles from './Collection.scss';
|
||||||
// import classNames from 'classnames/bind';
|
// import classNames from 'classnames/bind';
|
||||||
// const cx = classNames.bind(styles);
|
// const cx = classNames.bind(styles);
|
||||||
|
|
||||||
@observer class AtlasPreview extends React.Component {
|
@observer class Collection extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
data: React.PropTypes.object.isRequired,
|
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 store from './AtlasStore';
|
||||||
|
|
||||||
import Layout, { Title } from 'components/Layout';
|
import Layout, { Title } from 'components/Layout';
|
||||||
import AtlasPreviewLoading from 'components/AtlasPreviewLoading';
|
import PreviewLoading from 'components/PreviewLoading';
|
||||||
import CenteredContent from 'components/CenteredContent';
|
import CenteredContent from 'components/CenteredContent';
|
||||||
import DocumentList from 'components/DocumentList';
|
import DocumentList from 'components/DocumentList';
|
||||||
import Divider from 'components/Divider';
|
import Divider from 'components/Divider';
|
||||||
@ -86,7 +86,7 @@ class Atlas extends React.Component {
|
|||||||
transitionLeaveTimeout={0}
|
transitionLeaveTimeout={0}
|
||||||
>
|
>
|
||||||
{store.isFetching
|
{store.isFetching
|
||||||
? <AtlasPreviewLoading />
|
? <PreviewLoading />
|
||||||
: collection &&
|
: collection &&
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<div className={styles.atlasDetails}>
|
<div className={styles.atlasDetails}>
|
||||||
|
@ -7,8 +7,8 @@ import { Flex } from 'reflexbox';
|
|||||||
import DashboardStore from './DashboardStore';
|
import DashboardStore from './DashboardStore';
|
||||||
|
|
||||||
import Layout from 'components/Layout';
|
import Layout from 'components/Layout';
|
||||||
import AtlasPreview from 'components/AtlasPreview';
|
import Collection from 'components/Collection';
|
||||||
import AtlasPreviewLoading from 'components/AtlasPreviewLoading';
|
import PreviewLoading from 'components/PreviewLoading';
|
||||||
import CenteredContent from 'components/CenteredContent';
|
import CenteredContent from 'components/CenteredContent';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@ -34,22 +34,18 @@ class Dashboard extends React.Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Flex auto>
|
|
||||||
<Layout>
|
<Layout>
|
||||||
<CenteredContent>
|
<CenteredContent>
|
||||||
<Flex column auto>
|
<Flex column auto>
|
||||||
{this.store.isFetching
|
{this.store.isFetching
|
||||||
? <AtlasPreviewLoading />
|
? <PreviewLoading />
|
||||||
: this.store.collections &&
|
: this.store.collections &&
|
||||||
this.store.collections.map(collection => {
|
this.store.collections.map(collection => (
|
||||||
return (
|
<Collection key={collection.id} data={collection} />
|
||||||
<AtlasPreview key={collection.id} data={collection} />
|
))}
|
||||||
);
|
|
||||||
})}
|
|
||||||
</Flex>
|
</Flex>
|
||||||
</CenteredContent>
|
</CenteredContent>
|
||||||
</Layout>
|
</Layout>
|
||||||
</Flex>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ import Menu from './components/Menu';
|
|||||||
import Editor from 'components/Editor';
|
import Editor from 'components/Editor';
|
||||||
import Layout, { HeaderAction, SaveAction } from 'components/Layout';
|
import Layout, { HeaderAction, SaveAction } from 'components/Layout';
|
||||||
import PublishingInfo from 'components/PublishingInfo';
|
import PublishingInfo from 'components/PublishingInfo';
|
||||||
import AtlasPreviewLoading from 'components/AtlasPreviewLoading';
|
import PreviewLoading from 'components/PreviewLoading';
|
||||||
import CenteredContent from 'components/CenteredContent';
|
import CenteredContent from 'components/CenteredContent';
|
||||||
|
|
||||||
const DISCARD_CHANGES = `
|
const DISCARD_CHANGES = `
|
||||||
@ -138,7 +138,7 @@ type Props = {
|
|||||||
<Prompt when={this.store.hasPendingChanges} message={DISCARD_CHANGES} />
|
<Prompt when={this.store.hasPendingChanges} message={DISCARD_CHANGES} />
|
||||||
{this.store.isFetching &&
|
{this.store.isFetching &&
|
||||||
<CenteredContent>
|
<CenteredContent>
|
||||||
<AtlasPreviewLoading />
|
<PreviewLoading />
|
||||||
</CenteredContent>}
|
</CenteredContent>}
|
||||||
{this.store.document &&
|
{this.store.document &&
|
||||||
<Container>
|
<Container>
|
||||||
|
Reference in New Issue
Block a user