hiding help when it's unavailable
This commit is contained in:
parent
c35b6b1f15
commit
7dd7504415
1 changed files with 14 additions and 12 deletions
|
|
@ -32,7 +32,7 @@ import PlaneIcon from "products/AviationIcons/PlaneIcon";
|
|||
import AirportMapIcon from "products/AviationIcons/AirportMapIcon";
|
||||
import JobsiteIcon from "products/Construction/JobSiteIcon";
|
||||
import { getThemeType } from "theme";
|
||||
import { openCrispChat } from "chat/CrispChat";
|
||||
import { isCrispEnabled, openCrispChat } from "chat/CrispChat";
|
||||
import ObjectHeaterIcon from "products/Construction/ObjectHeaterIcon";
|
||||
import TasksIcon from "products/Construction/TasksIcon";
|
||||
import CableIcon from "products/Bindapt/CableIcon";
|
||||
|
|
@ -551,17 +551,19 @@ export default function SideNavigator(props: Props) {
|
|||
<Box sx={{ flex: 1, overflowY: "auto", scrollbarWidth: "none", "&::-webkit-scrollbar": { display: "none" } }}>
|
||||
{isAuthenticated && authenticatedSideMenu()}
|
||||
</Box>
|
||||
<Divider sx={{ my: 1 }} />
|
||||
<List className={classes.list} component="nav">
|
||||
<Tooltip title="Help" placement="right">
|
||||
<ListItemButton classes={{ root: classes.listItem }} onClick={() => openCrispChat()}>
|
||||
<ListItemIcon>
|
||||
<HelpOutline style={{ color: getThemeType() === "light" ? "black" : undefined }} />
|
||||
</ListItemIcon>
|
||||
{open && <ListItemText primary="Help" />}
|
||||
</ListItemButton>
|
||||
</Tooltip>
|
||||
</List>
|
||||
{isCrispEnabled() && (<>
|
||||
<Divider sx={{ my: 1 }} />
|
||||
<List className={classes.list} component="nav">
|
||||
<Tooltip title="Help" placement="right">
|
||||
<ListItemButton classes={{ root: classes.listItem }} onClick={() => openCrispChat()}>
|
||||
<ListItemIcon>
|
||||
<HelpOutline style={{ color: getThemeType() === "light" ? "black" : undefined }} />
|
||||
</ListItemIcon>
|
||||
{open && <ListItemText primary="Help" />}
|
||||
</ListItemButton>
|
||||
</Tooltip>
|
||||
</List>
|
||||
</>)}
|
||||
</Box>
|
||||
</SwipeableDrawer>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue