разнесение сообщений по сторонам от разных отправителей
This commit is contained in:
parent
e4ecd541ff
commit
1f133351e5
@ -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",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user