const clearTimeouts = (timeouts, name = null) => {
  timeouts.forEach((to) => {
    if (name == null || to.name === name) {
      window.clearTimeout(to.timeout);
    }