HM-31. Добавлен роутинг для страниц (#9)

This commit is contained in:
Nikolay
2020-07-14 20:18:49 +03:00
committed by GitHub
parent 521a80c1e3
commit 4ab8b1e273
15 changed files with 197 additions and 52 deletions

View File

@ -0,0 +1,19 @@
import Component from '../component/index';
import TableComponent from '../table-component';
import storageApi from '../../api/StorageServiceAPI';
class ApiPage extends Component {
constructor (mainNodeSelector, parentNode) {
super(mainNodeSelector, parentNode);
const initStorageListTable = async () => {
const list = await storageApi.request();
const storageListTable = new TableComponent(this.mainNode);
return storageListTable.render(list);
};
initStorageListTable();
}
}
export default ApiPage;