Search In Chatroom
The search in chatroom screen is designed to display the results of searched conversations, providing a detailed view of the conversations along with the associated usernames. Additionally, the screen offers optional customization parameters.
Code snippet without customisation
import { SearchInChatroom } from "@likeminds.community/chat-rn-core";
import { NavigationContainer } from "@react-navigation/native";
return (
// replace NavigationContainer with your navigation container
<NavigationContainer independent={true}>
<Stack.Navigator>
<Stack.Screen
name={"SearchInChatroom"}
component={SearchInChatroom}
/>
;
</Stack.Navigator>
</NavigationContainer>
);
Code snippet with customisation
import React from 'react';
import {SearchInChatroom} from '@likeminds.community/chat-rn-core';
import CustomSearchHeader from 'path_to_custom_search_header';
const SearchInChatroomScreen = () => {
return (
<SearchInChatroom
customSearchHeader={CustomSearchHeader} // pass custom header if you wanted to customise header else don't give this prop
/>;
)
};
export default SearchInChatroomScreen;
import { SearchInChatroomScreen } from "path_to_search_in_chatroom_screen";
import { NavigationContainer } from "@react-navigation/native";
return (
// replace NavigationContainer with your navigation container
<NavigationContainer independent={true}>
<Stack.Navigator>
<Stack.Screen
name={"SearchInChatroom"}
component={SearchInChatroomScreen}
/>
;
</Stack.Navigator>
</NavigationContainer>
);