mirror of
https://github.com/spacebarchat/client.git
synced 2024-11-25 11:42:30 +01:00
fix tooltip dates showing incorrect day
This commit is contained in:
parent
7d976d9063
commit
614061e30f
@ -96,14 +96,14 @@ export const MessageDetails = observer(({ message, position }: { message: Messag
|
||||
if (message instanceof Message && message.edited_timestamp) {
|
||||
return (
|
||||
<div className="messageTimestampWrapper">
|
||||
<Tooltip title={dayjs(message.timestamp).format("dddd, MMMM MM, YYYY h:mm A")} placement="top">
|
||||
<Tooltip title={dayjs(message.timestamp).format("dddd, MMMM D, YYYY h:mm A")} placement="top">
|
||||
<time className="copyTime" dateTime={message.edited_timestamp.toISOString()}>
|
||||
{dayjs(message.edited_timestamp).format("h:mm A")}
|
||||
</time>
|
||||
</Tooltip>
|
||||
<span className="edited">
|
||||
<Tooltip
|
||||
title={dayjs(message.edited_timestamp).format("dddd, MMMM MM, YYYY h:mm A")}
|
||||
title={dayjs(message.edited_timestamp).format("dddd, MMMM D, YYYY h:mm A")}
|
||||
placement="top"
|
||||
>
|
||||
<span>(edited)</span>
|
||||
@ -119,15 +119,17 @@ export const MessageDetails = observer(({ message, position }: { message: Messag
|
||||
);
|
||||
}
|
||||
|
||||
console.log(message.timestamp.toISOString());
|
||||
|
||||
return (
|
||||
<DetailBase>
|
||||
<Tooltip title={dayjs(message.timestamp).format("dddd, MMMM MM, YYYY h:mm A")} placement="top">
|
||||
<Tooltip title={dayjs(message.timestamp).format("dddd, MMMM D, YYYY h:mm A")} placement="top">
|
||||
<time className="copyTime" dateTime={message.timestamp.toISOString()}>
|
||||
{dayjs(message.timestamp).calendar(undefined, calendarStrings)}
|
||||
</time>
|
||||
</Tooltip>
|
||||
{message instanceof Message && message.edited_timestamp && (
|
||||
<Tooltip title={dayjs(message.edited_timestamp).format("dddd, MMMM MM, YYYY h:mm A")} placement="top">
|
||||
<Tooltip title={dayjs(message.edited_timestamp).format("dddd, MMMM D, YYYY h:mm A")} placement="top">
|
||||
<span className="edited">(edited)</span>
|
||||
</Tooltip>
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user