From 175ee60edb5dd1f373fb607f3c22c8712791f168 Mon Sep 17 00:00:00 2001 From: mkljczk Date: Tue, 7 Jan 2025 16:48:37 +0100 Subject: [PATCH] pl-fe: memoize sidebar navigation Signed-off-by: mkljczk --- packages/pl-fe/src/components/sidebar-navigation.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/pl-fe/src/components/sidebar-navigation.tsx b/packages/pl-fe/src/components/sidebar-navigation.tsx index 34d3a88a1..4a364fb3a 100644 --- a/packages/pl-fe/src/components/sidebar-navigation.tsx +++ b/packages/pl-fe/src/components/sidebar-navigation.tsx @@ -37,7 +37,7 @@ const messages = defineMessages({ }); /** Desktop sidebar with links to different views in the app. */ -const SidebarNavigation = () => { +const SidebarNavigation = React.memo(() => { const intl = useIntl(); const { unreadChatsCount } = useStatContext(); @@ -321,6 +321,6 @@ const SidebarNavigation = () => { )} ); -}; +}); export { SidebarNavigation as default };