From 0f2e3e7216908663323dac8adbd649f1be108c2b Mon Sep 17 00:00:00 2001 From: canove Date: Mon, 27 Jul 2020 17:30:53 -0300 Subject: [PATCH] Some style improovement --- .../src/components/ContactDrawer/index.js | 16 +++------ frontend/src/components/MessagesList/index.js | 35 +++++++++---------- frontend/src/pages/Chat/index.js | 6 ++-- frontend/src/pages/Dashboard/index.js | 10 +++--- 4 files changed, 29 insertions(+), 38 deletions(-) diff --git a/frontend/src/components/ContactDrawer/index.js b/frontend/src/components/ContactDrawer/index.js index e8006c9..de38c71 100644 --- a/frontend/src/components/ContactDrawer/index.js +++ b/frontend/src/components/ContactDrawer/index.js @@ -26,9 +26,10 @@ const useStyles = makeStyles(theme => ({ width: drawerWidth, display: "flex", borderTop: "1px solid rgba(0, 0, 0, 0.12)", + borderRight: "1px solid rgba(0, 0, 0, 0.12)", + borderBottom: "1px solid rgba(0, 0, 0, 0.12)", borderTopRightRadius: 4, borderBottomRightRadius: 4, - backgroundColor: "#eee", }, header: { display: "flex", @@ -41,17 +42,16 @@ const useStyles = makeStyles(theme => ({ }, content: { display: "flex", + backgroundColor: "#eee", flexDirection: "column", padding: "8px 0px 8px 8px", - // backgroundColor: "red", height: "100%", - overflow: "scroll", + overflowY: "scroll", "&::-webkit-scrollbar": { width: "8px", height: "8px", }, "&::-webkit-scrollbar-thumb": { - // borderRadius: "2px", boxShadow: "inset 0 0 6px rgba(0, 0, 0, 0.3)", backgroundColor: "#e8e8e8", }, @@ -97,13 +97,7 @@ const useStyles = makeStyles(theme => ({ }, })); -const ContactDrawer = ({ - open, - children, - handleDrawerClose, - contact, - loading, -}) => { +const ContactDrawer = ({ open, handleDrawerClose, contact, loading }) => { const classes = useStyles(); const [modalOpen, setModalOpen] = useState(false); diff --git a/frontend/src/components/MessagesList/index.js b/frontend/src/components/MessagesList/index.js index d985a39..a571d3f 100644 --- a/frontend/src/components/MessagesList/index.js +++ b/frontend/src/components/MessagesList/index.js @@ -65,6 +65,7 @@ const useStyles = makeStyles(theme => ({ messagesHeader: { display: "flex", + cursor: "pointer", backgroundColor: "#eee", flex: "none", borderBottom: "1px solid rgba(0, 0, 0, 0.12)", @@ -229,10 +230,9 @@ const MessagesList = () => { const [hasMore, setHasMore] = useState(false); const [searchParam, setSearchParam] = useState(""); const [pageNumber, setPageNumber] = useState(0); + const [drawerOpen, setDrawerOpen] = useState(false); const lastMessageRef = useRef(); - const [open, setOpen] = useState(true); - useEffect(() => { setMessagesList([]); }, [searchParam]); @@ -366,7 +366,9 @@ const MessagesList = () => { } }; - const handleUpdateTicketStatus = async (status, userId) => { + const handleUpdateTicketStatus = async (e, status, userId) => { + e.preventDefault(); + e.stopPropagation(); try { await api.put(`/tickets/${ticketId}`, { status: status, @@ -479,10 +481,10 @@ const MessagesList = () => { }; const handleDrawerOpen = () => { - setOpen(true); + setDrawerOpen(true); }; const handleDrawerClose = () => { - setOpen(false); + setDrawerOpen(false); }; return ( @@ -491,10 +493,14 @@ const MessagesList = () => { variant="outlined" elevation={0} className={clsx(classes.mainWrapper, { - [classes.mainWrapperShift]: open, + [classes.mainWrapperShift]: drawerOpen, })} > - + { @@ -537,22 +543,15 @@ const MessagesList = () => { - @@ -581,7 +580,7 @@ const MessagesList = () => { ({ }, chatPapper: { - // backgroundColor: "#eee", + // backgroundColor: "red", display: "flex", height: "100%", }, @@ -49,7 +49,7 @@ const Chat = () => { return (
- +
@@ -66,7 +66,7 @@ const Chat = () => { )} - +
); }; diff --git a/frontend/src/pages/Dashboard/index.js b/frontend/src/pages/Dashboard/index.js index 1d8f1d2..a75c863 100644 --- a/frontend/src/pages/Dashboard/index.js +++ b/frontend/src/pages/Dashboard/index.js @@ -1,15 +1,13 @@ import React from "react"; +import Paper from "@material-ui/core/Paper"; + const Dashboard = () => { return ( ); };