aboutsummaryrefslogtreecommitdiff
path: root/src/screens/chat/ChatScreen.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-04-02 17:00:11 -0400
committerIvan Chen <ivan@tagg.id>2021-04-02 17:00:11 -0400
commitc03eba730ad99bbadc49601f5f9387c1ca4c0eac (patch)
tree8b5adc82f86f1ab40cb6808073af60003c51d722 /src/screens/chat/ChatScreen.tsx
parent4edcaf03ae6e41ba9eb11a381540db4692375463 (diff)
created navigation to chat
Diffstat (limited to 'src/screens/chat/ChatScreen.tsx')
-rw-r--r--src/screens/chat/ChatScreen.tsx9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/screens/chat/ChatScreen.tsx b/src/screens/chat/ChatScreen.tsx
index af83f504..08145b89 100644
--- a/src/screens/chat/ChatScreen.tsx
+++ b/src/screens/chat/ChatScreen.tsx
@@ -3,15 +3,22 @@ import {View, StyleSheet, Text} from 'react-native';
import {StackNavigationProp} from '@react-navigation/stack';
import {MainStackParams} from '../../routes';
+import {navigationRef} from '../../RootNavigation';
+import {RouteProp} from '@react-navigation/native';
type ChatScreenNavigationProp = StackNavigationProp<MainStackParams, 'Chat'>;
+type ChatScreenRouteProp = RouteProp<MainStackParams, 'Chat'>;
interface ChatScreenProps {
navigation: ChatScreenNavigationProp;
+ route: ChatScreenRouteProp;
}
/*
* Screen that displays all of the user's active conversations.
*/
-const ChatScreen: React.FC<ChatScreenProps> = () => {
+const ChatScreen: React.FC<ChatScreenProps> = ({route}) => {
+ const {channel, chatClient} = route.params;
+ console.log(channel);
+ console.log(chatClient);
return (
<View style={styles.container}>
<Text style={styles.placeholder}>I am a chat!</Text>