Feats:
- Added a new ImageGrid UI component (for internal use only) (#703)
- Introduced
fetchChannelList
to theChannelListContext
.- Implemented a custom hook function
useFetchChannelList
. - Utilized this function to fetch the channel list within the
ChannelListUI
component. - Added relevant tests for this function.
- Provided the method through the
ChannelListContext
:fetchChannelList
.
Example Usage:import SendbirdProvider from '@sendbird/uikit-react/SendbirdProvider' import useSendbirdStateContext from '@sendbird/uikit-react/useSendbirdStateContext' import { ChannelListProvider, useChannelListContext } from '@sendbird/uikit-react/ChannelList/context' const isAboutSame = (a, b, px) => (Math.abs(a - b) <= px); const CustomChannelList = () => { const { allChannels, fetchChannelList, } = useChannelListContext(); return ( <div className="custom-channel-list" onScroll={(e) => { const target = e.target; if (isAboutSame(target.clientHeight + target.scrollTop, target.scrollHeight, 10)) { fetchChannelList(); } }} > {allChannels.map((channel) => { return // custom channel list item })} </div> ); }; const CustomApp = () => { return ( <div className="custom-app"> <SendbirdProvider ... > <ChannelListProvider ... > <CustomChannelList /> </ChannelListProvider> </SendbirdProvider> </div> ); };
- Implemented a custom hook function
Fixes:
- Removed duplicated getEmoji API call from the
useGetChannel
hook (#705). - Fixed missing
SEND_MESSAGE_FAILED
event publishing (#704):- Addressed the failure state in
sendbirdSelectors.getSendUserMessage
and published theSEND_MESSAGE_FAILED
event. - Corrected typo
SEND_MESSAGEGE_FAILURE
.
- Addressed the failure state in