changes per tom's comments
This commit is contained in:
@@ -117,11 +117,7 @@ type Props = {
|
||||
/>
|
||||
: <a onClick={this.onEdit}>Edit</a>}
|
||||
</HeaderAction>
|
||||
<Menu
|
||||
store={this.store}
|
||||
document={this.store.document}
|
||||
collectionTree={this.store.collectionTree}
|
||||
/>
|
||||
<Menu store={this.store} document={this.store.document} />
|
||||
</Flex>
|
||||
);
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ import DocumentStore from '../DocumentStore';
|
||||
type Props = {
|
||||
history: Object,
|
||||
document: DocumentType,
|
||||
collectionTree: ?Object,
|
||||
store: DocumentStore,
|
||||
};
|
||||
|
||||
@@ -19,8 +18,9 @@ type Props = {
|
||||
props: Props;
|
||||
|
||||
onCreateDocument = () => {
|
||||
invariant(this.props.collectionTree, 'collectionTree is not available');
|
||||
this.props.history.push(`${this.props.collectionTree.url}/new`);
|
||||
// Disabled until created a better API
|
||||
// invariant(this.props.collectionTree, 'collectionTree is not available');
|
||||
// this.props.history.push(`${this.props.collectionTree.url}/new`);
|
||||
};
|
||||
|
||||
onCreateChild = () => {
|
||||
@@ -57,7 +57,6 @@ type Props = {
|
||||
const document = get(this.props, 'document');
|
||||
if (document) {
|
||||
const collection = document.collection;
|
||||
debugger;
|
||||
const allowDelete =
|
||||
collection &&
|
||||
collection.type === 'atlas' &&
|
||||
@@ -77,9 +76,8 @@ type Props = {
|
||||
{allowDelete && <MenuItem onClick={this.onDelete}>Delete</MenuItem>}
|
||||
</DropdownMenu>
|
||||
);
|
||||
} else {
|
||||
return <div />;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ export async function presentDocument(ctx, document, options) {
|
||||
id: document.atlasId,
|
||||
},
|
||||
}));
|
||||
return await presentCollection(ctx, collection);
|
||||
return presentCollection(ctx, collection);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user