Skip to content

Commit

Permalink
type(header-anchor): use correct Event type
Browse files Browse the repository at this point in the history
  • Loading branch information
NedcloarBR committed Jul 17, 2024
1 parent e5370a3 commit 591e695
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/header/header-anchor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -18,7 +18,7 @@ export function HeaderAnchor({ target }: Readonly<Props>) {
setAnchorTarget(document.getElementById(target))
}, [target])

function handleClick(event: FormEvent<HTMLAnchorElement>) {
function handleClick(event: MouseEvent<HTMLAnchorElement>) {
event.preventDefault();
anchorTarget?.scrollIntoView({ behavior: "smooth", block: "start" })
}
Expand Down

0 comments on commit 591e695

Please sign in to comment.