HOT-FIX. Добавлены методы создания компонентов и нод внутри компонентов

This commit is contained in:
2020-08-08 21:56:43 +03:00
parent aeb16d45e5
commit 5b9c6a8f94
28 changed files with 99 additions and 73 deletions

View File

@ -2,7 +2,6 @@ import Component from '../component/index';
import routeService from '../../services/RouteService';
import './MainMenu.css';
import {createElement} from '../../utils/elementUtils';
import {EVENTS} from '../../consts';
import tokenApi from '../../api/TokenAPI';
@ -69,14 +68,14 @@ class MainMenu extends Component {
render = () => {
this.menuItems = NAV_MENU.map(({url, title, className = ''}) => {
const li = createElement({
const li = this.createElement({
tagName: 'li',
parentNode: this.buttonsContainer,
options: {
className: `nav-item ${className}`,
},
});
const link = createElement({
const link = this.createElement({
tagName: 'a',
parentNode: li,
options: {