2017-08-24 21:54:02 +00:00
|
|
|
const html = require('choo/html');
|
2018-02-13 19:32:59 +00:00
|
|
|
const file = require('../file');
|
2017-08-24 21:54:02 +00:00
|
|
|
|
2018-07-31 18:09:18 +00:00
|
|
|
module.exports = function(state) {
|
2017-08-24 21:54:02 +00:00
|
|
|
if (state.storage.files.length) {
|
2018-02-16 20:56:53 +00:00
|
|
|
return html`
|
2018-07-31 18:09:18 +00:00
|
|
|
<ul class="fileList">
|
|
|
|
${state.storage.files.map(f => file(f, state))}
|
|
|
|
</ul>
|
2017-08-24 21:54:02 +00:00
|
|
|
`;
|
|
|
|
}
|
|
|
|
};
|