Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
seanes committed Nov 26, 2024
1 parent ab60ed8 commit f35f251
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/components/GlobalMenu/AccountMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ export const AccountMenu = ({
items={accountSwitcher}
/>
);
};
};
9 changes: 5 additions & 4 deletions lib/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
import { useEscapeKey } from '../../hooks';
import { DrawerBase, DropdownBase } from '../Dropdown';
import { GlobalMenu, type GlobalMenuProps } from '../GlobalMenu';
import type { Account } from '../GlobalMenu/AccountButton.tsx';
import type { Account } from '../GlobalMenu';
import { useRootContext } from '../RootProvider';
import { Searchbar, type SearchbarProps } from '../Searchbar';
import { HeaderBase } from './HeaderBase';
import { HeaderButton } from './HeaderButton';
import { HeaderLogo } from './HeaderLogo';
import { HeaderLogo, type HeaderLogoProps } from './HeaderLogo';
import { HeaderMenu } from './HeaderMenu';
import { HeaderSearch } from './HeaderSearch';
import styles from './header.module.css';
Expand All @@ -16,9 +16,10 @@ export interface HeaderProps {
menu: GlobalMenuProps;
search?: SearchbarProps;
currentAccount?: Account;
logo?: HeaderLogoProps;
}

export const Header = ({ search, menu, currentAccount }: HeaderProps) => {
export const Header = ({ search, menu, currentAccount, logo = {} }: HeaderProps) => {
const { currentId, toggleId, openId, closeAll } = useRootContext();

useEscapeKey(closeAll);
Expand All @@ -37,7 +38,7 @@ export const Header = ({ search, menu, currentAccount }: HeaderProps) => {

return (
<HeaderBase currentId={currentId} open={currentId === 'search' || currentId === 'menu'} onClose={closeAll}>
<HeaderLogo className={styles.logo} />
<HeaderLogo {...logo} className={styles.logo} />
<HeaderMenu className={styles.menu}>
<HeaderButton
avatar={
Expand Down

0 comments on commit f35f251

Please sign in to comment.