npm uninstall react-router-dom
, поставить 5-ю версию npm install react-router-dom@5
el.innerHTML = xhr.response.country == 'UAE' ? '<img src="/assets/img/logo/logo2.svg" alt="logo-img">' : '<img src="assets/img/logo/logo.svg" alt="logo-img">' ;
let listHeaders = document.querySelectorAll('.list-header');
listHeaders.forEach((elem) => {
elem.addEventListener('click', function() {
let parentElem = this.parentNode;
let listContent = parentElem.querySelector('.list-content');
let arrowDown = parentElem.querySelector('.arrow-down');
let headerText = parentElem.querySelector('.header-text');
if(listContent.classList.contains('.active') | arrowDown.classList.contains('active') | headerText.classList.contains('active')){
listContent.classList.remove('active');
arrowDown.classList.remove('active');
headerText.classList.remove('active');
} else {
if (document.querySelector('.active')) {
for (let x of document.querySelectorAll('.active')) {
x.classList.remove('active');
}
}
listContent.classList.add('active');
arrowDown.classList.add('active');
headerText.classList.add('active');
}
})
})
var hex = "354d413043b4b440e1510b00";
var not_hex = Buffer.from(hex, 'hex');
var hex_again = Buffer.from(not_hex, 'utf8').toString('hex');
console.log(hex, not_hex)
console.log(hex_again)
// выводит
// 354d413043b4b440e1510b00 <Buffer 35 4d 41 30 43 b4 b4 40 e1 51 0b 00>
// 354d413043b4b440e1510b00
Я создал простейший сервер на Node
.then(result =>{
let res = result[0]
console.log('result = ',res[0]);
pool.end();
if( result === undefined ) throw new Error();
})
.then(() =>{
console.log("end");
})
.catch(function(err) {
console.log(err.message);
})