added chat drawer

This commit is contained in:
Carter 2024-12-04 10:41:46 -06:00
parent 7c3b0a3ab0
commit 1a9ee12533
7 changed files with 196 additions and 110 deletions

View file

@ -1,4 +1,4 @@
import { Box, CircularProgress } from "@mui/material";
import { Box, CircularProgress, Theme } from "@mui/material";
import { useGlobalState, useNoteAPI, useTeamAPI } from "providers";
import React from "react";
import { useCallback } from "react";
@ -9,6 +9,7 @@ import ChatOutput from "./ChatOutput";
import { Note } from "models";
import { pond } from "protobuf-ts/pond";
import moment from "moment-timezone";
import { makeStyles } from "@mui/styles";
interface Props {
objectKey: string;
@ -26,6 +27,7 @@ export default function Chat(props: Props) {
const [attachmentMap, setAttachmentMap] = useState<Map<string, pond.FileReference[]>>(new Map());
const teamAPI = useTeamAPI();
// const classes = useStyles();
const loadNotes = useCallback(() => {
let currentNotes: Note[] = notes;
@ -36,7 +38,6 @@ export default function Chat(props: Props) {
if (resp.data.notes.length < 1) {
return;
}
setTotalMessages(resp.data.total);
let tempNotes: Note[] = [];
let tempAttachmentMap: Map<string, pond.FileReference[]> = attachmentMap;