разнесение сообщений по сторонам от разных отправителей

This commit is contained in:
Nastya 2024-03-27 09:31:30 +03:00
parent e4ecd541ff
commit 1f133351e5
5 changed files with 5 additions and 1 deletions

@ -24,6 +24,7 @@ export default function ChatDocument({
display: "flex",
gap: "9px",
padding: isSelf ? "0 8px 0 0" : "0 0 0 8px",
justifyContent: isSelf ? "end" : "start",
}}
>
<Typography sx={{

@ -32,6 +32,7 @@ export default function ChatImage({
display: "flex",
gap: "9px",
padding: isSelf ? "0 8px 0 0" : "0 0 0 8px",
justifyContent: isSelf ? "end" : "start",
}}
>
<Typography sx={{

@ -24,6 +24,7 @@ export default function ChatMessage({
display: "flex",
gap: "9px",
padding: isSelf ? "0 8px 0 0" : "0 0 0 8px",
justifyContent: isSelf ? "end" : "start",
}}
>
<Typography sx={{

@ -24,6 +24,7 @@ export default function ChatImage({
display: "flex",
gap: "9px",
padding: isSelf ? "0 8px 0 0" : "0 0 0 8px",
justifyContent: isSelf ? "end" : "start",
}}
>
<Typography

@ -18,7 +18,7 @@ export default function Message({ message, isSelf }: Props) {
{new Date(message.created_at).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })}
</Typography>
);
console.log(isSelf)
return (
<Box sx={{
display: "flex",