From fcbcf77c0ab6228260c6e215d34eea5280aaef6d Mon Sep 17 00:00:00 2001 From: Aaryan Porwal Date: Mon, 2 Sep 2024 11:48:43 +0530 Subject: [PATCH] fix: forwardRef from SideNavigationLink component --- .../SideNavigationLink/SideNavigationLink.tsx | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/src/components/SideNavigation/SideNavigationLink/SideNavigationLink.tsx b/src/components/SideNavigation/SideNavigationLink/SideNavigationLink.tsx index 85825012..f6aa3e7e 100644 --- a/src/components/SideNavigation/SideNavigationLink/SideNavigationLink.tsx +++ b/src/components/SideNavigation/SideNavigationLink/SideNavigationLink.tsx @@ -17,21 +17,24 @@ export type Props = Omit< */ component?: SideNavigationBaseProps["component"]; }; -const SideNavigationLink = forwardRef( - ({ component, ref, ...props }: Props) => { - let className: string | null = null; - if ("className" in props && typeof props.className === "string") { - className = props.className; - delete props.className; - } - return ( - - ); + +const SideNavigationLink = forwardRef< + HTMLAnchorElement, + Props +>(({ component, ...props }, ref) => { + let className: string | null = null; + if ("className" in props && typeof props.className === "string") { + className = props.className; + delete props.className; } -); + return ( + + ); +}); export default SideNavigationLink;