fixed unmounted component update error
This commit is contained in:
parent
65eeb9e8b4
commit
3e1e65ad88
3 changed files with 3 additions and 3 deletions
|
|
@ -32,6 +32,7 @@ import {
|
||||||
IsOmniAir
|
IsOmniAir
|
||||||
} from "services/whiteLabel";
|
} from "services/whiteLabel";
|
||||||
import MiningIcon from "products/ventilation/MiningIcon";
|
import MiningIcon from "products/ventilation/MiningIcon";
|
||||||
|
import { useAuth0 } from "@auth0/auth0-react";
|
||||||
|
|
||||||
const drawerWidth = 230;
|
const drawerWidth = 230;
|
||||||
|
|
||||||
|
|
@ -101,6 +102,7 @@ interface Props {
|
||||||
|
|
||||||
export default function SideNavigator(props: Props) {
|
export default function SideNavigator(props: Props) {
|
||||||
const { open, onOpen, onClose } = props;
|
const { open, onOpen, onClose } = props;
|
||||||
|
const { isAuthenticated } = useAuth0()
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const width = useWidth();
|
const width = useWidth();
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
|
|
@ -233,7 +235,7 @@ export default function SideNavigator(props: Props) {
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
<Divider />
|
<Divider />
|
||||||
{/* {isAuthenticated || isOffline() ? authenticatedSideMenu() : unauthenticatedSideMenu()} */}
|
{/* {isAuthenticated || isOffline() ? authenticatedSideMenu() : unauthenticatedSideMenu()} */}
|
||||||
{authenticatedSideMenu()}
|
{isAuthenticated && authenticatedSideMenu()}
|
||||||
</SwipeableDrawer>
|
</SwipeableDrawer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -2,7 +2,6 @@ import MineDarkIcon from "assets/components/mineIconDark.png";
|
||||||
import MineLightIcon from "assets/components/mineIconLight.png";
|
import MineLightIcon from "assets/components/mineIconLight.png";
|
||||||
import { ImgIcon } from "common/ImgIcon";
|
import { ImgIcon } from "common/ImgIcon";
|
||||||
import { useThemeType } from "hooks";
|
import { useThemeType } from "hooks";
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
type?: "light" | "dark";
|
type?: "light" | "dark";
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ import VentilationDarkIcon from "assets/products/ventilation/ventIconDark.png";
|
||||||
import VentilationLightIcon from "assets/products/ventilation/ventIconLight.png";
|
import VentilationLightIcon from "assets/products/ventilation/ventIconLight.png";
|
||||||
import { ImgIcon } from "common/ImgIcon";
|
import { ImgIcon } from "common/ImgIcon";
|
||||||
import { useThemeType } from "hooks";
|
import { useThemeType } from "hooks";
|
||||||
import React from "react";
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
type?: "light" | "dark";
|
type?: "light" | "dark";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue