aboutsummaryrefslogtreecommitdiff
path: root/src/views/freeformcanvas/NodeContainer.tsx
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-01-15 07:57:16 -0500
committerTyler Schicke <tyler_schicke@brown.edu>2019-01-15 07:57:16 -0500
commit3de39e2608e62a278b9c8cc37b53333f0877fa59 (patch)
tree0843d7cc199b54f80517c987a9f9d0d47cbb883d /src/views/freeformcanvas/NodeContainer.tsx
parente1ed82ff684877b56925016282a0e4d5bb4e1b4b (diff)
Have most of document stuff working
Diffstat (limited to 'src/views/freeformcanvas/NodeContainer.tsx')
-rw-r--r--src/views/freeformcanvas/NodeContainer.tsx9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/views/freeformcanvas/NodeContainer.tsx b/src/views/freeformcanvas/NodeContainer.tsx
index a2edb38a4..c59ab194e 100644
--- a/src/views/freeformcanvas/NodeContainer.tsx
+++ b/src/views/freeformcanvas/NodeContainer.tsx
@@ -6,6 +6,7 @@ import { TextNodeView } from "../nodes/TextNodeView";
import { VideoNodeView } from "../nodes/VideoNodeView";
import "./FreeFormCanvas.scss";
import React = require("react");
+import { DocumentView } from "../nodes/DocumentView";
interface IProps {
store: NodeCollectionStore
@@ -17,12 +18,8 @@ export class NodeContainer extends React.Component<IProps> {
render() {
return (
<div className="node-container">
- {this.props.store.Nodes.map(nodeStore => {
- if (nodeStore instanceof StaticTextNodeStore) {
- return (<TextNodeView key={nodeStore.Id} store={nodeStore as StaticTextNodeStore} />)
- } else if (nodeStore instanceof VideoNodeStore) {
- return (<VideoNodeView key={nodeStore.Id} store={nodeStore as VideoNodeStore} />)
- }
+ {this.props.store.Docs.map(doc => {
+ return (<DocumentView key={doc.Id} doc={doc} />);
})}
</div>
);