From 8657887ea54e761aeee9ce463d447b97803fdf9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Poizat?= Date: Mon, 4 Nov 2024 17:24:22 +0100 Subject: [PATCH] fix: Do not embed an a element in a element Let's forward the "href" and "_target" props to NavLink to avoid the need of an a element before the NavLink. --- src/components/AppLayout.jsx | 44 ++++++++++++++---------------------- 1 file changed, 17 insertions(+), 27 deletions(-) diff --git a/src/components/AppLayout.jsx b/src/components/AppLayout.jsx index 744046b..3226a9e 100644 --- a/src/components/AppLayout.jsx +++ b/src/components/AppLayout.jsx @@ -34,12 +34,9 @@ const ExampleRouterNavLink = ({ className, active, activeClassName, - onClick + ...rest }) => ( - + {children} ) @@ -112,28 +109,21 @@ const AppLayout = () => { {currentAccountFolderLink && ( - - - - - {t('Sidebar.documents')} - {!isMobile && ( - - )} - - - + + + + {t('Sidebar.documents')} + {!isMobile && ( + + )} + + )}