Last active
April 7, 2020 09:41
-
-
Save vishalnarkhede/bac80bfd2c159bb62fe95e560f1d65ea to your computer and use it in GitHub Desktop.
This file contains 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 {StreamChat} from 'stream-chat'; | |
const chatClient = new StreamChat('q95x9hkbyd6p'); | |
const userToken = | |
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoidmlzaGFsIn0.LpDqH6U8V8Qg9sqGjz0bMQvOfWrWKAjPKqeODYM0Elk'; | |
const user = { | |
id: 'vishal', | |
name: 'Vishal', | |
}; | |
chatClient.setUser(user, userToken); | |
const ChannelListDrawer = props => { | |
return ( | |
<ChannelList | |
client={chatClient} | |
changeChannel={channelId => { | |
props.navigation.jumpTo('ChannelScreen', { | |
channelId, | |
}); | |
}} | |
/> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment