From 591e695638fece206198112afcbe00cffab3cf7c Mon Sep 17 00:00:00 2001 From: NedcloarBR Date: Wed, 17 Jul 2024 17:00:41 -0300 Subject: [PATCH] type(header-anchor): use correct Event type --- src/components/header/header-anchor.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/header/header-anchor.tsx b/src/components/header/header-anchor.tsx index c7c4997..3ad070c 100644 --- a/src/components/header/header-anchor.tsx +++ b/src/components/header/header-anchor.tsx @@ -2,7 +2,7 @@ import { Link } from "@/navigation"; import { useTranslations } from "next-intl"; -import { ComponentProps, FormEvent, useEffect, useState } from "react" +import { ComponentProps, MouseEvent, useEffect, useState } from "react" interface Props extends ComponentProps<"a"> { target: string @@ -18,7 +18,7 @@ export function HeaderAnchor({ target }: Readonly) { setAnchorTarget(document.getElementById(target)) }, [target]) - function handleClick(event: FormEvent) { + function handleClick(event: MouseEvent) { event.preventDefault(); anchorTarget?.scrollIntoView({ behavior: "smooth", block: "start" }) }