mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 00:20:07 +00:00
Code optimized (#2388)
This commit is contained in:
committed by
Daniel Pan
parent
6b62d3e653
commit
490a15deed
@@ -9,23 +9,25 @@ class TreeDirView extends React.Component {
|
||||
let children = node.hasChildren() ? node.children : null;
|
||||
|
||||
return (
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style={{width: "4%"}}></th>
|
||||
<th style={{width: "60%"}}>{gettext('Name')}</th>
|
||||
<th style={{width: "16%"}}>{gettext('Size')}</th>
|
||||
<th style={{width: "20%"}}>{gettext('Last Update')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{children && children.map((node, index) => {
|
||||
return (
|
||||
<TreeDirList key={index} node={node} onMainNodeClick={this.props.onMainNodeClick}></TreeDirList>
|
||||
)
|
||||
})}
|
||||
</tbody>
|
||||
</table>
|
||||
<div className="table-container">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style={{width: "4%"}}></th>
|
||||
<th style={{width: "60%"}}>{gettext('Name')}</th>
|
||||
<th style={{width: "16%"}}>{gettext('Size')}</th>
|
||||
<th style={{width: "20%"}}>{gettext('Last Update')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{children && children.map((node, index) => {
|
||||
return (
|
||||
<TreeDirList key={index} node={node} onMainNodeClick={this.props.onMainNodeClick}></TreeDirList>
|
||||
)
|
||||
})}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user