Skip to content

Commit

Permalink
Update yarn.lock, format code
Browse files Browse the repository at this point in the history
  • Loading branch information
bdb-dd committed Jun 18, 2024
1 parent 87eb3c6 commit b06e516
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
Binary file modified .yarn/install-state.gz
Binary file not shown.
1 change: 0 additions & 1 deletion apps/admin/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ h1 {
line-height: 1.1;
}


.appContainer {
/* display: flex; */
/* flex-direction: column; */
Expand Down
36 changes: 21 additions & 15 deletions apps/admin/src/components/ChatMessageItemView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import React, { useEffect } from "react";
import { Button, Box } from "@mui/material";
import { DocsUserQuery, Message, User } from "../models/Models";
import { useUsers } from "../hooks/useUsers";
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faCopy } from '@fortawesome/free-solid-svg-icons';

import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faCopy } from "@fortawesome/free-solid-svg-icons";

interface ChatMessageItemViewProps {
message: Message;
Expand Down Expand Up @@ -40,7 +39,6 @@ const ChatMessageItemView: React.FC<ChatMessageItemViewProps> = ({
<Box
display="flex"
flexDirection="column"

width="100%"
style={{ color: "black" }}
>
Expand All @@ -50,31 +48,39 @@ const ChatMessageItemView: React.FC<ChatMessageItemViewProps> = ({
width="100%"
justifyContent="space-between"
>
<span style={{ color: "gray"}}>
<span style={{ color: "gray" }}>
{users?.filter((u) => u.user_id == message.user_id)[0]!?.name}
</span>

<Box>
<Button
onClick={() => (navigator.clipboard.writeText(message.content.original_user_query))}
onClick={() =>
navigator.clipboard.writeText(
message.content.original_user_query,
)
}
className="copy-query"
size="small"
sx={{ color: "#EEEEEE", minWidth: 0, padding: 0, marginRight: 1 }}
sx={{
color: "#EEEEEE",
minWidth: 0,
padding: 0,
marginRight: 1,
}}
>
<FontAwesomeIcon icon={faCopy} />
</Button>
<span style={{ color: "gray" }}>
{new Date(message.ts_date * 1000).toTimeString().slice(0, 5)
+ " " + new Date(message.ts_date * 1000).toLocaleDateString("en-US",
{ day: "2-digit", month: "short", })}
{new Date(message.ts_date * 1000).toTimeString().slice(0, 5) +
" " +
new Date(message.ts_date * 1000).toLocaleDateString("en-US", {
day: "2-digit",
month: "short",
})}
</span>

</Box>

</Box>
<Box>
{(message.content as DocsUserQuery).original_user_query}
</Box>
<Box>{(message.content as DocsUserQuery).original_user_query}</Box>
</Box>
</Box>
);
Expand Down
2 changes: 1 addition & 1 deletion apps/admin/src/components/ChatMessageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const ChatMessageView: React.FC<Props> = ({
setCurrentMessageId({
ts_date: message.ts_date,
ts_time: message.ts_time,
});
});
}}
/>
)}
Expand Down

0 comments on commit b06e516

Please sign in to comment.