Add channel or dm name to chat header
This commit is contained in:
@@ -68,13 +68,24 @@ export const Messages = (): JSX.Element => {
|
|||||||
<div className="flex w-full justify-between border-b border-gray-300 px-2 dark:border-gray-600 dark:text-gray-300">
|
<div className="flex w-full justify-between border-b border-gray-300 px-2 dark:border-gray-600 dark:text-gray-300">
|
||||||
<div className="my-auto flex gap-2 py-2 text-sm">
|
<div className="my-auto flex gap-2 py-2 text-sm">
|
||||||
<IconButton icon={<FiHash className="h-4 w-4" />} />
|
<IconButton icon={<FiHash className="h-4 w-4" />} />
|
||||||
{/* <div className="my-auto">
|
<div className="my-auto">
|
||||||
{channels[channelIndex]?.settings?.name.length
|
{channels.findIndex((ch) => ch.index === selectedChatIndex) !==
|
||||||
? channels[channelIndex]?.settings?.name
|
-1 ? (
|
||||||
: channels[channelIndex]?.role === Protobuf.Channel_Role.PRIMARY
|
<span className="text-gray-500 dark:text-gray-400">
|
||||||
|
{channels[selectedChatIndex]?.settings?.name.length
|
||||||
|
? channels[selectedChatIndex]?.settings?.name
|
||||||
|
: channels[selectedChatIndex]?.role ===
|
||||||
|
Protobuf.Channel_Role.PRIMARY
|
||||||
? 'Primary'
|
? 'Primary'
|
||||||
: `Channel: ${channels[channelIndex]?.index}`}
|
: `Channel: ${channels[selectedChatIndex]?.index}`}
|
||||||
</div> */}
|
</span>
|
||||||
|
) : (
|
||||||
|
<span className="text-gray-500 dark:text-gray-400">
|
||||||
|
{nodes.find((n) => n.number === selectedChatIndex)?.user
|
||||||
|
?.longName ?? 'Unknown'}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
|||||||
Reference in New Issue
Block a user