diff --git a/packages/smarthr-ui/src/components/Header/Header.tsx b/packages/smarthr-ui/src/components/Header/Header.tsx index 7eb8347dca..45c645947e 100644 --- a/packages/smarthr-ui/src/components/Header/Header.tsx +++ b/packages/smarthr-ui/src/components/Header/Header.tsx @@ -95,17 +95,12 @@ export const Header: React.FC & ElementProps> = ({ } }, [enableNew, className]) - const actualLogo = useMemo( - () => logo || , - [logo, enableNew], - ) - return ( - - {actualLogo} - + + {logo} + {enableNew ? ( ) : ( @@ -124,6 +119,14 @@ export const Header: React.FC & ElementProps> = ({ ) } +const Logo = React.memo< + Pick & { children: Props['logo']; href: Props['href']; className: string } +>(({ children, href, enableNew, className }) => ( + + {children || } + +)) + const MemoizedAppLauncher = React.memo>( ({ featureName, apps, enableNew, featureName }) => { const decorators = useMemo(() => {