mirror of
https://github.com/status-im/wakuconnect-chat-sdk.git
synced 2025-01-29 21:35:28 +00:00
Fix channel transition from narrow (#73)
This commit is contained in:
parent
6fa1eddbc7
commit
6bd351ed41
@ -1,4 +1,4 @@
|
||||
import React, { useCallback, useMemo, useState } from "react";
|
||||
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
||||
import styled from "styled-components";
|
||||
|
||||
import { useNarrow } from "../../contexts/narrowProvider";
|
||||
@ -71,6 +71,13 @@ export function ChatBody({
|
||||
setShowMembersList(!showMembersList);
|
||||
}, [showMembersList]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!narrow) {
|
||||
setShowChannelsList(false);
|
||||
setShowMembersList(false);
|
||||
}
|
||||
}, [narrow]);
|
||||
|
||||
return (
|
||||
<ChatBodyWrapper className={className}>
|
||||
<ChatTopbar
|
||||
|
Loading…
x
Reference in New Issue
Block a user