scrollToBottom = () => {
console.log('scrollToBottom');
(function smoothscroll() {
const currentScroll = document.documentElement.scrollTop || document.body.scrollTop;
const clientHeight = document.documentElement.clientHeight;
const scrollHeight = document.documentElement.scrollHeight;
if (scrollHeight - 10 > currentScroll + clientHeight) {
window.requestAnimationFrame(smoothscroll);
window.scrollTo(0, currentScroll + (scrollHeight - currentScroll - clientHeight) / 2);
}
})();
};
setTimeout(scrollToBottom, 100);