Skip to content

Instantly share code, notes, and snippets.

@sendbird-community
Created December 3, 2022 20:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sendbird-community/8a9af176288961d7dbd4334cd77b9aaa to your computer and use it in GitHub Desktop.
Save sendbird-community/8a9af176288961d7dbd4334cd77b9aaa to your computer and use it in GitHub Desktop.
How to utilize the OpenChannelSettings module
import OpenChannelSettings from '@sendbird/uikit-react/OpenChannelSettings';
import { OpenChannelProvider, useOpenChannelContext } from '@sendbird/uikit-react/OpenChannelSettings/context';
const MyComponent = () => {
const openChannelSettingsState = useOpenChannelSettingsContext();
return (
...render custom component
);
};
<OpenChannelSettingsProvider>
<MyComponent />
<OpenChannelSettingsProvider/>
const ModifiedModalView = () => {
const openChannelSettingsState = useOpenChannelSettingsContext();
return (
...render custom component
);
};
<OpenChannelSettings
onChannelModified={ModifiedModalView}
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment