const useScrollToId = (id: string) => {
  const el = document.getElementById(id);
  if (el) {
    el.scrollIntoView();
    return true;
  } else {
    return false;
  }
};

export default useScrollToId;
