How can I open a specific channel from the ChannelList in React UI Kit? I have the specific channelUrl. Currently, the first channel in the list opens by default.
Hey @zipdoc_dev
If you’re using the SendbirdProvider
UI Kit setup, you can pass the channelUrl into GroupChannelProvider
as a prop.
import SendbirdProvider from '@sendbird/uikit-react/SendbirdProvider'
import { GroupChannelProvider } from '@sendbird/uikit-react/GroupChannel/context'
export const Messaging = ({
appId,
userId,
accessToken,
channelUrl,
}: MessagingProps) => {
return (
<SendbirdProvider
appId={appId}
userId={userId}
accessToken={accessToken}
>
{channelUrl (
<GroupChannelProvider channelUrl={channelUrl}>
{render your GroupChannel}
</GroupChannelProvider>
)}
</SendbirdProvider>
)
}>