@poolse/react-ui 3.6.0 → 3.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -2725,7 +2725,8 @@ function QuotedCard({
|
|
|
2725
2725
|
labelFor,
|
|
2726
2726
|
onClick
|
|
2727
2727
|
}) {
|
|
2728
|
-
const
|
|
2728
|
+
const { profile: quotedSender } = useUser(quoted.sender_external_id ?? null);
|
|
2729
|
+
const senderLabel = quoted.sender_external_id ? labelFor?.(quoted.sender_external_id) ?? quotedSender?.displayName ?? quoted.sender_external_id : "Unknown";
|
|
2729
2730
|
const isDeleted = !!quoted.deleted_at;
|
|
2730
2731
|
const handleClick = onClick ? () => onClick(quoted.id) : void 0;
|
|
2731
2732
|
return /* @__PURE__ */ jsxs(
|
|
@@ -4921,8 +4922,9 @@ function DefaultRow({
|
|
|
4921
4922
|
}) {
|
|
4922
4923
|
const isDirect = conv.type === "direct";
|
|
4923
4924
|
const otherExtId = isDirect && meExternalId ? (conv.member_external_ids ?? []).find((x) => x !== meExternalId) : null;
|
|
4924
|
-
const
|
|
4925
|
-
const
|
|
4925
|
+
const { profile: other } = useUser(isDirect && otherExtId ? otherExtId : null);
|
|
4926
|
+
const title = isDirect ? otherExtId ? labelFor?.(otherExtId) ?? other?.displayName ?? otherExtId : conv.name ?? "Direct chat" : conv.name ?? "Untitled group";
|
|
4927
|
+
const avatarUrl = isDirect ? otherExtId ? avatarFor?.(otherExtId) ?? other?.avatarUrl ?? null : conv.avatar_url ?? null : conv.avatar_url ?? null;
|
|
4926
4928
|
const time = conv.last_message_at ? formatRelative(conv.last_message_at) : "";
|
|
4927
4929
|
const hasUnread = unread > 0;
|
|
4928
4930
|
const preview = formatCallLogPreview(conv.last_message_preview, meId) ?? conv.last_message_preview ?? (conv.last_sequence > 0 ? `${conv.last_sequence} message${conv.last_sequence === 1 ? "" : "s"}` : "No messages yet");
|