fixed unmounted component update error

This commit is contained in:
Carter 2025-03-18 12:41:35 -06:00
parent 65eeb9e8b4
commit 3e1e65ad88
3 changed files with 3 additions and 3 deletions

View file

@ -32,6 +32,7 @@ import {
IsOmniAir
} from "services/whiteLabel";
import MiningIcon from "products/ventilation/MiningIcon";
import { useAuth0 } from "@auth0/auth0-react";
const drawerWidth = 230;
@ -101,6 +102,7 @@ interface Props {
export default function SideNavigator(props: Props) {
const { open, onOpen, onClose } = props;
const { isAuthenticated } = useAuth0()
const theme = useTheme();
const width = useWidth();
const classes = useStyles();
@ -233,7 +235,7 @@ export default function SideNavigator(props: Props) {
</Toolbar>
<Divider />
{/* {isAuthenticated || isOffline() ? authenticatedSideMenu() : unauthenticatedSideMenu()} */}
{authenticatedSideMenu()}
{isAuthenticated && authenticatedSideMenu()}
</SwipeableDrawer>
);
}