re-aligned add bin button and closing crisp chat when chat drawer is opened

This commit is contained in:
Carter 2026-02-26 15:00:32 -06:00
parent 4871100365
commit abc77cc27a
3 changed files with 10 additions and 7 deletions

View file

@ -27,7 +27,7 @@ const useStyles = makeStyles((theme: Theme) => {
},
position: "fixed",
bottom: theme.spacing(8), //for mobile navigator
right: theme.spacing(10.25),
right: theme.spacing(2),
[theme.breakpoints.up("sm")]: {
bottom: theme.spacing(1.75)
}

View file

@ -1,5 +1,5 @@
import { ChevronRight } from "@mui/icons-material";
import { Avatar, Box, Divider, Drawer, IconButton, Theme, Tooltip, Typography } from "@mui/material";
import { Avatar, Box, Drawer, IconButton, Theme, Tooltip, Typography } from "@mui/material";
import { makeStyles } from "@mui/styles";
import { useMobile } from "hooks";
import { Team } from "models";
@ -7,7 +7,7 @@ import Chat from "./Chat";
import { pond } from "protobuf-ts/pond";
import { useEffect, useState } from "react";
import { useTeamAPI } from "providers";
import { openCrispChat } from './CrispChat';
import { closeCrispChat, openCrispChat } from './CrispChat';
import RobotIcon from "products/CommonIcons/robotIcon";
const useStyles = makeStyles<Theme>((theme: Theme) => ({
@ -67,6 +67,12 @@ export function ChatDrawer(props: Props) {
onClose()
}
useEffect(() => {
if (open) {
closeCrispChat()
}
}, [open])
return (
<Drawer
open={open}

View file

@ -20,10 +20,7 @@ import {
Accordion,
AccordionSummary,
AccordionDetails,
darken,
Typography,
ToggleButton,
ToggleButtonGroup
} from "@mui/material";
import BinActions from "bin/BinActions";
import BinHistory from "bin/BinHistory";
@ -60,7 +57,7 @@ import { Ambient } from "models/Ambient";
import moment from "moment";
import BinStorageConditions from "bin/BinStorageConditions";
import BinConditioningCard from "bin/BinConditioningCard";
import { makeStyles, styled } from "@mui/styles";
import { makeStyles } from "@mui/styles";
import { useNavigate, useParams } from "react-router-dom";
import { Controller } from "models/Controller";
import TaskViewer from "tasks/TaskViewer";