Refactor smart components

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
Jamie Kyle 2024-03-13 13:44:13 -07:00 committed by GitHub
parent 05c09ef769
commit 27b55e472d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
109 changed files with 3583 additions and 2629 deletions

View file

@ -1,7 +1,7 @@
// Copyright 2023 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import React, { useCallback } from 'react';
import React, { memo, useCallback } from 'react';
import { useSelector } from 'react-redux';
import type { NavTabPanelProps } from '../../components/NavTabs';
import { NavTabs } from '../../components/NavTabs';
@ -33,7 +33,7 @@ export type SmartNavTabsProps = Readonly<{
renderStoriesTab(props: NavTabPanelProps): JSX.Element;
}>;
export function SmartNavTabs({
export const SmartNavTabs = memo(function SmartNavTabs({
navTabsCollapsed,
onToggleNavTabsCollapse,
renderCallsTab,
@ -91,4 +91,4 @@ export function SmartNavTabs({
unreadStoriesCount={unreadStoriesCount}
/>
);
}
});