Created
December 7, 2021 09:14
-
-
Save hieptl/5e1963b1b972991426546c5d89e5bfd5 to your computer and use it in GitHub Desktop.
conversations.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useContext } from 'react'; | |
import { createNativeStackNavigator } from '@react-navigation/native-stack'; | |
import { CometChatUserListWithMessages, CometChatMessages } from '../cometchat-pro-react-native-ui-kit'; | |
import Context from '../context'; | |
const Conversations = () => { | |
const Stack = createNativeStackNavigator(); | |
const { cometChat } = useContext(Context); | |
if (!cometChat) { | |
return; | |
} | |
return ( | |
<Stack.Navigator | |
screenOptions={{ headerShown: false }} | |
initialRouteName={"UserListWithMessages"}> | |
<Stack.Screen name="UserListWithMessages" component={CometChatUserListWithMessages} /> | |
<Stack.Screen name="CometChatMessages" component={CometChatMessages} /> | |
</Stack.Navigator> | |
); | |
}; | |
export default Conversations; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment