Skip to content

Commit

Permalink
chore: rename useNextLinkProps to useNextLink
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed Jan 21, 2024
1 parent ce05d70 commit 3804db0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/use-next-link-props/index.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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(() => {
Expand Down

0 comments on commit 3804db0

Please sign in to comment.