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