-
-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(routing): add chat and channel routing
- Loading branch information
1 parent
460af4f
commit 96ddf86
Showing
6 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { useColorScheme } from "@hooks/useColorScheme" | ||
import { Stack } from "expo-router" | ||
|
||
|
||
const ChatLayout = () => { | ||
const { colors } = useColorScheme() | ||
|
||
return ( | ||
<Stack screenOptions={{ | ||
headerShadowVisible: false, | ||
headerStyle: { backgroundColor: colors.background } | ||
}}> | ||
<Stack.Screen name='index' | ||
options={{ | ||
title: 'Chat', | ||
headerLargeTitle: false | ||
}} | ||
/> | ||
<Stack.Screen name='channel-settings' | ||
options={{ | ||
title: 'Channel Settings', | ||
headerLargeTitle: false | ||
}} | ||
/> | ||
</Stack> | ||
) | ||
} | ||
|
||
export default ChatLayout |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { View } from "react-native" | ||
import { Text } from '@components/nativewindui/Text' | ||
|
||
const ChannelSettings = () => { | ||
return ( | ||
<View> | ||
<Text>Channel Settings</Text> | ||
</View> | ||
) | ||
} | ||
|
||
export default ChannelSettings |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
|
||
import { View, Text } from 'react-native' | ||
import { useLocalSearchParams } from 'expo-router'; | ||
|
||
const Chat = () => { | ||
const { id } = useLocalSearchParams(); | ||
|
||
console.log("Channel id: ", id); | ||
|
||
return ( | ||
<View> | ||
<Text>{id}</Text> | ||
</View> | ||
) | ||
} | ||
|
||
export default Chat |
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