Adding posthog navigation
This commit is contained in:
139
App.js
139
App.js
@@ -29,6 +29,7 @@ import NewGroup from './Views/NewGroup.js';
|
||||
import Slideshow from './Views/Slideshow.js';
|
||||
import SongPlayer from './Views/SongPlayer.js';
|
||||
import { Platform } from 'react-native';
|
||||
import { PostHogProvider } from 'posthog-react-native'
|
||||
|
||||
|
||||
const Tab = createBottomTabNavigator();
|
||||
@@ -260,75 +261,77 @@ export default function App() {
|
||||
}} theme={theme}>
|
||||
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : 'height'} style={{ flex: 1 }}>
|
||||
<NavigationContainer>
|
||||
<StatusBar style="dark" />
|
||||
<Stack.Navigator screenOptions={{
|
||||
header: (props) => {
|
||||
return (
|
||||
<Appbar.Header style={{ backgroundColor: '#fff' }}>
|
||||
{props.navigation.canGoBack() ? <Appbar.BackAction onPress={() => {
|
||||
props.navigation.goBack();
|
||||
}} /> : <Appbar.Action icon="menu" style={{ padding: 0, margin: 0 }} onPress={() => { props.navigation.navigate('Menu'); }} />}
|
||||
<Appbar.Content title="EMI Fellowship" titleStyle={{}} />
|
||||
<Appbar.Action icon="chat" onPress={() => {
|
||||
alert("Chats are comming soon.");
|
||||
}} onLongPress={()=>{
|
||||
props.navigation.navigate("SongPlayer");
|
||||
}} />
|
||||
<Appbar.Action icon="search" onPress={() => { props.navigation.navigate("Search") }} />
|
||||
<Appbar.Action icon="notifications" onPress={() => { props.navigation.navigate("Notifications") }} />
|
||||
</Appbar.Header>
|
||||
)
|
||||
},
|
||||
}}>
|
||||
<Stack.Screen
|
||||
name="MainNavigation"
|
||||
component={MainNavigation}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="Profile"
|
||||
component={Profile}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="NewPost"
|
||||
component={NewPostView}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="NewGroup"
|
||||
component={NewGroup}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="Search"
|
||||
component={Search}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="ProfileSettings"
|
||||
component={ProfileSettings}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="Invite"
|
||||
component={InviteView}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="Menu"
|
||||
component={MenuView}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="Notifications"
|
||||
component={NotificationsView}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="Slideshow"
|
||||
component={Slideshow}
|
||||
<PostHogProvider apiKey="phc_2zh7SoBDi83vaa7Rz4YWTXWCjV0bOLfiqRyUo2mkf0b" autocapture>
|
||||
<StatusBar style="dark" />
|
||||
<Stack.Navigator screenOptions={{
|
||||
header: (props) => {
|
||||
return (
|
||||
<Appbar.Header style={{ backgroundColor: '#fff' }}>
|
||||
{props.navigation.canGoBack() ? <Appbar.BackAction onPress={() => {
|
||||
props.navigation.goBack();
|
||||
}} /> : <Appbar.Action icon="menu" style={{ padding: 0, margin: 0 }} onPress={() => { props.navigation.navigate('Menu'); }} />}
|
||||
<Appbar.Content title="EMI Fellowship" titleStyle={{}} />
|
||||
<Appbar.Action icon="chat" onPress={() => {
|
||||
alert("Chats are comming soon.");
|
||||
}} onLongPress={() => {
|
||||
props.navigation.navigate("SongPlayer");
|
||||
}} />
|
||||
<Appbar.Action icon="search" onPress={() => { props.navigation.navigate("Search") }} />
|
||||
<Appbar.Action icon="notifications" onPress={() => { props.navigation.navigate("Notifications") }} />
|
||||
</Appbar.Header>
|
||||
)
|
||||
},
|
||||
}}>
|
||||
<Stack.Screen
|
||||
name="MainNavigation"
|
||||
component={MainNavigation}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="Profile"
|
||||
component={Profile}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="NewPost"
|
||||
component={NewPostView}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="NewGroup"
|
||||
component={NewGroup}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="Search"
|
||||
component={Search}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="ProfileSettings"
|
||||
component={ProfileSettings}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="Invite"
|
||||
component={InviteView}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="Menu"
|
||||
component={MenuView}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="Notifications"
|
||||
component={NotificationsView}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="Slideshow"
|
||||
component={Slideshow}
|
||||
//options={{ headerShown: false }}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="SongPlayer"
|
||||
component={SongPlayer}
|
||||
/>
|
||||
<Stack.Screen name="SinglePost" component={SinglePost} />
|
||||
<Stack.Screen name="Login" component={Login} options={{ headerShown: false }} />
|
||||
<Tab.Screen name="Logout" component={Login} />
|
||||
</Stack.Navigator>
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="SongPlayer"
|
||||
component={SongPlayer}
|
||||
/>
|
||||
<Stack.Screen name="SinglePost" component={SinglePost} />
|
||||
<Stack.Screen name="Login" component={Login} options={{ headerShown: false }} />
|
||||
<Tab.Screen name="Logout" component={Login} />
|
||||
</Stack.Navigator>
|
||||
</PostHogProvider>
|
||||
</NavigationContainer>
|
||||
<MediaView></MediaView>
|
||||
</KeyboardAvoidingView>
|
||||
|
||||
Reference in New Issue
Block a user