export const handleScrollTo = (e: React.MouseEvent<HTMLAnchorElement>) => {
  e.preventDefault();
  const link: HTMLAnchorElement = e.currentTarget;
  if (link.hash && link.hash != "") {
    document
      .getElementById(link.hash.substring(1, undefined))
      ?.scrollIntoView({ behavior: "smooth", block: "start" });
  }
};

export function capitalization (str: string) {
  return str.substring(0,1).toUpperCase() + str.substring(1);
}