diff --git a/packages/smarthr-ui/src/components/Header/Header.tsx b/packages/smarthr-ui/src/components/Header/Header.tsx index 45c645947e..e8480480d5 100644 --- a/packages/smarthr-ui/src/components/Header/Header.tsx +++ b/packages/smarthr-ui/src/components/Header/Header.tsx @@ -62,15 +62,15 @@ type Props = { type ElementProps = Omit, keyof Props> -const COMMON_GAP = { column: 0.25, row: 0 } -const CHILDREN_GAP = { column: 0.5, row: 0.25 } +const COMMON_GAP = { column: 0.25, row: 0 } as const +const CHILDREN_GAP = { column: 0.5, row: 0.25 } as const export const Header: React.FC & ElementProps> = ({ enableNew, logo, - logoHref = '/', + logoHref, featureName, - apps = [], + apps, tenants, currentTenantId, onTenantSelect, @@ -120,15 +120,15 @@ export const Header: React.FC & ElementProps> = ({ } const Logo = React.memo< - Pick & { children: Props['logo']; href: Props['href']; className: string } + Pick & { children: Props['logo']; href: Props['logoHref']; className: string } >(({ children, href, enableNew, className }) => ( - + {children || } )) const MemoizedAppLauncher = React.memo>( - ({ featureName, apps, enableNew, featureName }) => { + ({ featureName, apps, enableNew }) => { const decorators = useMemo(() => { if (!featureName) { return undefined @@ -137,7 +137,9 @@ const MemoizedAppLauncher = React.memo featureName } }, [featureName]) - return featureName && + return ( + featureName && + ) }, ) @@ -175,7 +177,7 @@ const TenantSwitcher = React.memo< }) const MultiTenantDropdownMenuButton = React.memo< - Pick, 'tenants'> & Pick & { label: string } + Pick, 'tenants'> & Pick & { label: ReactNode } >(({ label, tenants, onTenantSelect }) => { const onClick = useMemo( () =>