From f7954432ae350e897a9d27fd0d5e8585513f6ec7 Mon Sep 17 00:00:00 2001 From: Szymon Lesisz Date: Mon, 16 Sep 2019 14:45:22 +0200 Subject: [PATCH] fix NextLink + React.forwardRef https://github.com/zeit/next.js/issues/7915#issuecomment-519786376 --- packages/suite/src/components/suite/Link/index.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/suite/src/components/suite/Link/index.tsx b/packages/suite/src/components/suite/Link/index.tsx index 5c09a4f4fdf..181198d4410 100644 --- a/packages/suite/src/components/suite/Link/index.tsx +++ b/packages/suite/src/components/suite/Link/index.tsx @@ -24,6 +24,11 @@ const Link = ({ children, href, className, target = '_self', ...rest }: Props) = }; const { prefetch, shallow, scroll, replace, ...linkProps } = rest; + const WrappedLink = React.forwardRef(() => ( + + {children} + + )); return ( - - {children} - + ); };