Bug on leaving channel

Hi, I am trying to use the “Leave channel” native functionality from sendbird and I am encountering two issues:

  1. once the user clicks “Leave” on the modal that gets displayed after clicking “leave channel”, the modal does not get closed. What should be added to having that modal closed after clicking “Leave”/“Cancel” and not only getting close when the “close” button is pressed?

  2. The Channel List is not getting updated. I mean, I open the chat to go to the “info” and be able to click “leave channel” (posting a pic to be more clear), but once I click “Leave Channel”, that view associated to the channel Url I have just left should be removed and that is not happening. How can this be solved?

once I have successfully left it, I shouldn’t be able to remain on this view But I am (the public Room is the room I have left (that is why I have a button of join chat)

Hello @Romina_Salveraglio,

It looks like you may be using a heavily customized version of the UIKit. Can you provide more context into how you’ve implemented the UIKit? Also, can you provide OS, Version etc?

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