diff options
Diffstat (limited to 'app/client/common/fileList.component.js')
| -rw-r--r-- | app/client/common/fileList.component.js | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/app/client/common/fileList.component.js b/app/client/common/fileList.component.js index c16928f..f596c8d 100644 --- a/app/client/common/fileList.component.js +++ b/app/client/common/fileList.component.js @@ -30,13 +30,22 @@ export const FileList = props => { onClick /> }) + if (! (files && files.length)) { + return ( + <div className={'rows ' + className}> + <div class='row heading'> + <h4 class='noFiles'>No files</h4> + </div> + </div> + ) + } return ( <div className={'rows ' + className}> - <div class='row heading'> - {(files && files.length) - ? (title && <h3>{title}</h3>) - : <h4>No files</h4>} - </div> + {title && + <div class='row heading'> + <h3>{title}</h3>} + </div> + } <div className={'rows ' + fileListClassName}> {fileList} |
