export function determineScrollBottom(e: any, callback: any) {
  const scrollHeight = e.target.scrollHeight;
  const scrollTop = e.target.scrollTop;
  const clientHeight = e.target.clientHeight;
  const scrolledToBottom = scrollTop / (scrollHeight - clientHeight) >= 0.9;

  if (scrolledToBottom) {
    callback();
  }
}
