Skip to content

Commit

Permalink
Fix React.useMemo deps
Browse files Browse the repository at this point in the history
  • Loading branch information
m4theushw committed May 11, 2023
1 parent 5687cdc commit f049dc3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions docs/src/modules/components/AppNavDrawer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import NextLink from 'next/link';
import { useRouter } from 'next/router';
import Button from '@mui/material/Button';
import Divider from '@mui/material/Divider';
import { styled, alpha } from '@mui/material/styles';
Expand Down Expand Up @@ -296,7 +295,6 @@ const iOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigato
export default function AppNavDrawer(props) {
const { className, disablePermanent, mobileOpen, onClose, onOpen } = props;
const { activePageParents, pages, productIdentifier } = React.useContext(PageContext);
const router = useRouter();
const [anchorEl, setAnchorEl] = React.useState(null);
const t = useTranslate();
const mobile = useMediaQuery((theme) => theme.breakpoints.down('lg'));
Expand Down Expand Up @@ -425,7 +423,7 @@ export default function AppNavDrawer(props) {
{navItems}
</React.Fragment>
);
}, [router.asPath, onClose, pages, activePageParents, t, productIdentifier, anchorEl]);
}, [onClose, pages, activePageParents, t, productIdentifier, anchorEl]);

return (
<nav className={className} aria-label={t('mainNavigation')}>
Expand Down

0 comments on commit f049dc3

Please sign in to comment.