From 3804db08454ec3bb39218a7aa37bc0fd9c0d6ff5 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Sun, 21 Jan 2024 17:02:01 +0800 Subject: [PATCH] chore: rename `useNextLinkProps` to `useNextLink` --- src/use-next-link-props/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/use-next-link-props/index.ts b/src/use-next-link-props/index.ts index e5fdfa64..4112ae0b 100644 --- a/src/use-next-link-props/index.ts +++ b/src/use-next-link-props/index.ts @@ -1,4 +1,5 @@ import 'client-only'; + import type { LinkProps } from 'next/link'; import { useCallback, useEffect, useMemo, useState } from 'react'; import type { MouseEvent } from 'react'; @@ -8,7 +9,7 @@ export interface ExtraProps { isPending: boolean } -export const useNextLinkProps = (props: LinkProps): LinkProps & ExtraProps => { +export const useNextLink = (props: LinkProps): LinkProps & ExtraProps => { const pathname = usePathname(); const [targetPathname, setTargetPathname] = useState(() => pathname); useEffect(() => {