Chat tabs können durch erneutes auswählen geschlossen werden

This commit is contained in:
PxlLoewe
2025-07-11 23:31:47 -07:00
parent 280393b307
commit a11c8683c4

View File

@@ -139,7 +139,13 @@ export const Chat = () => {
<Fragment key={userId}>
<a
className={cn("indicator tab", selectedChat === userId && "tab-active")}
onClick={() => setSelectedChat(userId)}
onClick={() => {
if (selectedChat === userId) {
setSelectedChat(null);
return;
}
setSelectedChat(userId);
}}
>
{chat.name}
{chat.notification && <span className="indicator-item status status-info" />}