diff --git a/src/app/UserWrapper.tsx b/src/app/UserWrapper.tsx index bf07306..e69ea85 100644 --- a/src/app/UserWrapper.tsx +++ b/src/app/UserWrapper.tsx @@ -162,10 +162,7 @@ export default function UserWrapper(props: Props) { document.head.appendChild(style); } - console.log(isMobile) - if (isMobile) { - console.log("isMobile") style.textContent = ` #crisp-chatbox [aria-label="Open chat"] { bottom: 6em !important; diff --git a/src/chat/ChatDrawer.tsx b/src/chat/ChatDrawer.tsx index 51f7c2c..1c2c9e9 100644 --- a/src/chat/ChatDrawer.tsx +++ b/src/chat/ChatDrawer.tsx @@ -1,41 +1,39 @@ import { ChevronRight } from "@mui/icons-material"; -import { Box, Drawer, IconButton, Theme, Typography } from "@mui/material"; +import { Avatar, Box, Drawer, IconButton, Theme, Typography } from "@mui/material"; import { makeStyles } from "@mui/styles"; import { useMobile } from "hooks"; import { Team } from "models"; import Chat from "./Chat"; import { pond } from "protobuf-ts/pond"; -const useStyles = makeStyles((theme: Theme) => { - return ({ - chatDrawer: { - display: "flex", - flexDirection: "column", // Arrange children vertically - backgroundColor: theme.palette.background.default, - height: "100%", - maxHeight: "100%", - minHeight: "100%", - minWidth: theme.spacing(54), - maxWidth: theme.spacing(54), - }, - chatContainer: { - flex: 1, - overflow: "hidden", - }, - chatDrawerMobile: { - backgroundColor: theme.palette.background.default, - height: "auto", - width: "100%" - }, - drawerHeader: { - display: "flex", - alignItems: "center", - padding: theme.spacing(1), - ...theme.mixins.toolbar, - justifyContent: "flex-start" - } - }); -}); +const useStyles = makeStyles((theme: Theme) => ({ + chatDrawer: { + display: "flex", + flexDirection: "column", + backgroundColor: theme.palette.background.default, + height: "100%", + maxHeight: "100%", + minHeight: "100%", + minWidth: theme.spacing(54), + maxWidth: theme.spacing(54), + }, + chatContainer: { + flex: 1, + overflow: "hidden", + }, + chatDrawerMobile: { + backgroundColor: theme.palette.background.default, + height: "auto", + width: "100%", + }, + drawerHeader: { + display: "flex", + alignItems: "center", + padding: theme.spacing(1), + ...theme.mixins.toolbar, + justifyContent: "flex-start", + }, +})); interface Props { open: boolean; @@ -48,17 +46,53 @@ export function ChatDrawer(props: Props) { const isMobile = useMobile(); const classes = useStyles() + console.log(team.settings.avatar) + return ( - - - - - + + + {/* Side icon column */} + ({ + backgroundColor: theme.palette.background.paper, + borderRight: `1px solid ${theme.palette.divider}`, + })} + > + {/* Add your icons here */} + + {/* */} + + + + {/* */} - {team.name()} Chat - - + + {/* Main chat area */} + + + + + + {team.name()} Chat + + + +