- {messages?.map((msg, i) => {
- //const isLast = i === messages.length - 1
- //const noTail = !isLast && messages[i + 1]?.fromDID === msg.fromDID
-
- showTime = false;
- if (i >= 0) {
- const duration = new Date(messages[i]?.timestamp);
- const dateString = duration.toDateString();
- if (dateString !== time || i === 0) {
- showTime = true;
- time = dateString;
- }
- }
- return (
-
- {!showTime ? null : (
-
- )}
-
-
-
- );
- })}
-
-