Skip to content

Commit

Permalink
added config channels
Browse files Browse the repository at this point in the history
  • Loading branch information
mishramonalisha76 committed Oct 17, 2024
1 parent d6a8b9a commit ee5c1e8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ export default function App() {
<ChatUIProvider
user={userPushSDKInstance}
theme={darkMode && darkChatTheme}
debug={true}
debug={false}
uiConfig={{
suppressToast: false,
}}
Expand Down
7 changes: 4 additions & 3 deletions src/modules/channels/Channels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ const Channels: FC<ChannelsProps> = () => {
tag: filters.category === AllCategories ? '' : filters.category,
});

let channels =
const channels =
loadingChannels || searchingChannels
? Array(9).fill(0)
: (filters.search ? searchList : channelList)?.pages.flatMap((page) => page.channels) || [];
channels = channels.filter((channel) => !channelFilterList.includes(channel.channel));
: (filters.search ? searchList : channelList)?.pages
.flatMap((page) => page.channels)
.filter((channel) => !channelFilterList.includes(channel.channel)) || [];

const filteredFrontendChannels = filterFrontendChannels(channels, filters);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ const ChannelSearchAndChainSelection: FC<ChannelSearchAndChainSelectionProps> =
[setFilter]
);

useEffect(() => {
setSearchQuery(filters.search as string);
}, [filters]);
// useEffect(() => {
// setSearchQuery(filters.search as string);
// }, [filters]);

useEffect(() => {
!initialLoad && getSearchResults(searchQuery);
Expand Down

0 comments on commit ee5c1e8

Please sign in to comment.