import React from 'react'; import DirectoryFileList from './DirectoryFileList'; import DirectoryTreeNode from './DirectoryTreeNode'; export default class DirectoryTree extends React.Component { getDirectoryTreeDomNodes(tree, depth = 0) { let index = 0; depth++; return Object.keys(tree).map((branchName) => { let branch = tree[branchName]; index++; if (branchName === 'files') { return ( ); } else { return ( ); } }); } render() { return (
{this.getDirectoryTreeDomNodes(this.props.tree, this.props.depth)}
); } }