Chat tabs können durch erneutes auswählen geschlossen werden
This commit is contained in:
@@ -139,7 +139,13 @@ export const Chat = () => {
|
|||||||
<Fragment key={userId}>
|
<Fragment key={userId}>
|
||||||
<a
|
<a
|
||||||
className={cn("indicator tab", selectedChat === userId && "tab-active")}
|
className={cn("indicator tab", selectedChat === userId && "tab-active")}
|
||||||
onClick={() => setSelectedChat(userId)}
|
onClick={() => {
|
||||||
|
if (selectedChat === userId) {
|
||||||
|
setSelectedChat(null);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setSelectedChat(userId);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{chat.name}
|
{chat.name}
|
||||||
{chat.notification && <span className="indicator-item status status-info" />}
|
{chat.notification && <span className="indicator-item status status-info" />}
|
||||||
|
|||||||
Reference in New Issue
Block a user