yes of course, sorry I didn’t do that when I posted my question.
I am using:
import { Channel, ChannelList, SendBirdProvider } from ‘@sendbird/uikit-react’;
I am handling like differents “scenarios” in order to decide what to display is chat is “minimized” or not
If user select to see like the channel messages, I display
<Channel
channelUrl={currentChannelUrl}
renderChannelHeader={() => <ChatHeader {...headerProps} />}
renderMessageInput={() => <ChatInput onMessageSent={onMessageSent} />}
/>
ChatHeader is a component that I use for handling what is displayed on the header of the chat (the cross, left row icon, info icon, etc)
When user click the info icon, a component that is ChatSettings get displayed.
ChatSettings is a component that uses
import ChannelSettingsUI from '@sendbird/uikit-react/ChannelSettings/components/ChannelSettingsUI';
import { ChannelSettingsProvider, useChannelSettingsContext } from '@sendbird/uikit-react/ChannelSettings/context';
and returns
<ChannelSettingsProvider
onLeaveChannel={() => {
handleLeaveChannel();
}}
channelUrl={currentChannelUrl || ''}
className={CHAT_CLASSNAME}
>
<Settings {...props} />
</ChannelSettingsProvider>
);
Here is where I am trying to use leave channel functionality
handleLeaveChannel is a method where I updates information that is getting displayed on of which channels is the user member (on the page, not on the chat component)
But I am encountering those issues I mentioned.
Where should I be handling the modal? shouldn’t it be getting closed If user clicks “leave”?
Could something of my code be causing this behaviour?
In the native component once the user clicks leave channel, what happens with the channel he/she was on, the one that was being displayed for them to be able to click info and leave channel? To which “view” does they get redirected to?
I am using the version 3.14.3 of uikit
node 20.11
working on ubuntu 22.04