Skip to content

Commit

Permalink
Destructure props for Mobile header
Browse files Browse the repository at this point in the history
  • Loading branch information
skanderm committed Mar 13, 2024
1 parent 6973e10 commit df760f6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ui/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,13 @@ export default function Header({
);
}

function Mobile(props: { window?: () => Window; onBrandClick?: () => void }) {
const { window } = props;
function Mobile({
window,
onBrandClick,
}: {
window?: () => Window;
onBrandClick?: () => void;
}) {
const drawerWidth = "100%";
const [menuIsOpen, setMenuOpen] = useState(false);

Expand Down Expand Up @@ -100,7 +105,7 @@ function Mobile(props: { window?: () => Window; onBrandClick?: () => void }) {
>
{menuIsOpen ? <Close /> : <Menu />}
</IconButton>
<Brand onClick={props.onBrandClick} />
<Brand onClick={onBrandClick} />
</Box>
<nav>
<Drawer
Expand Down

0 comments on commit df760f6

Please sign in to comment.