Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
xrutayisire committed Aug 30, 2024
1 parent 489428a commit 205fb87
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/PrismicNextLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ export type PrismicNextLinkProps = Omit<
export const PrismicNextLink = React.forwardRef<
HTMLAnchorElement,
PrismicNextLinkProps
>(function PrismicNextLink(
{ field, document, linkResolver, children, ...restProps },
ref,
): JSX.Element | null {
>(function PrismicNextLink(props, ref): JSX.Element | null {
const { field, document, linkResolver, children, ...restProps } = props;
const {
href: computedHref,
rel: computedRel,
Expand All @@ -54,7 +52,7 @@ export const PrismicNextLink = React.forwardRef<

return (
<Link ref={ref} {...attrs} {...restProps} href={href} rel={rel}>
{"children" in restProps ? children : text}
{"children" in props ? children : text}
</Link>
);
});

0 comments on commit 205fb87

Please sign in to comment.