feat: creating chats for cards and clients, sending and deleting text messages
This commit is contained in:
24
src/pages/ClientsPage/drawers/ClientChatDrawer.tsx
Normal file
24
src/pages/ClientsPage/drawers/ClientChatDrawer.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import { useChatContext } from "../contexts/ChatContext.tsx";
|
||||
import { Drawer } from "@mantine/core";
|
||||
import Chat from "../../../components/Chat/Chat.tsx";
|
||||
|
||||
|
||||
const ClientChatDrawer = () => {
|
||||
const { chat, setChat } = useChatContext();
|
||||
|
||||
if (!chat) return;
|
||||
|
||||
return (
|
||||
<Drawer
|
||||
opened={!!chat}
|
||||
onClose={() => setChat(null)}
|
||||
position={"right"}
|
||||
size={"calc(50vw)"}
|
||||
withCloseButton={false}
|
||||
>
|
||||
<Chat />
|
||||
</Drawer>
|
||||
);
|
||||
};
|
||||
|
||||
export default ClientChatDrawer;
|
||||
Reference in New Issue
Block a user