implement prototipe of navigate
This commit is contained in:
parent
701df1ff80
commit
80b544f270
13
App.tsx
13
App.tsx
@ -1,19 +1,16 @@
|
||||
import 'react-native-gesture-handler';
|
||||
import * as React from 'react';
|
||||
|
||||
import {StyleSheet, View, Platform, SafeAreaView} from 'react-native';
|
||||
import {BigbluebuttonMobile} from 'bigbluebutton-mobile-sdk';
|
||||
import { Bootstrap } from './react-native/bootstrap/start/component';
|
||||
import { Routes } from './react-native/app/routes/component';
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<SafeAreaView>
|
||||
{/* <BigbluebuttonMobile
|
||||
broadcastAppBundleId="org.bigbluebutton.mobile.BigBlueButton-Broadcast"
|
||||
url="https://bigbluebutton.org"
|
||||
style={styles.bbb}
|
||||
/> */}
|
||||
<Bootstrap/>
|
||||
</SafeAreaView>
|
||||
<>
|
||||
<Routes/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
12
react-native/app/pages/list_portals/component.js
vendored
Normal file
12
react-native/app/pages/list_portals/component.js
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
import React from 'react'
|
||||
import { Text, View } from 'react-native';
|
||||
|
||||
export const ListPortals = ()=>{
|
||||
return (
|
||||
<>
|
||||
<View style={{marginTop: 10}}>
|
||||
<Text style={{color: 'black'}}>List</Text>
|
||||
</View>
|
||||
</>
|
||||
)
|
||||
}
|
37
react-native/app/routes/component.js
vendored
Normal file
37
react-native/app/routes/component.js
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
import * as React from 'react';
|
||||
import { Button, View } from 'react-native';
|
||||
import { createDrawerNavigator } from '@react-navigation/drawer';
|
||||
import { NavigationContainer } from '@react-navigation/native';
|
||||
import { ListPortals } from '../pages/list_portals/component';
|
||||
|
||||
function NotificationsScreen({ navigation }) {
|
||||
return (
|
||||
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
|
||||
<Button onPress={() => navigation.goBack()} title="Go back home" />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function Test(){
|
||||
return (
|
||||
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
|
||||
<Button title="Go back home" />
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
const Drawer = createDrawerNavigator();
|
||||
export const Routes = ()=>{
|
||||
return (
|
||||
<NavigationContainer>
|
||||
<Drawer.Navigator initialRouteName="Portals" screenOptions={{ headerShown: false}}>
|
||||
<Drawer.Screen name="Portals" component={ListPortals} />
|
||||
<Drawer.Screen name="Notifications" component={NotificationsScreen} />
|
||||
|
||||
{['1','2'].map((item)=>{
|
||||
return <Drawer.Screen key={item} name={item} component={NotificationsScreen} />
|
||||
})}
|
||||
</Drawer.Navigator>
|
||||
</NavigationContainer>
|
||||
);
|
||||
}
|
8
react-native/bootstrap/start/component.js
vendored
8
react-native/bootstrap/start/component.js
vendored
@ -1,14 +1,16 @@
|
||||
import React from 'react'
|
||||
import { Text, View } from 'react-native'
|
||||
import { GestureHandlerRootView } from 'react-native-gesture-handler'
|
||||
import { Routes } from '../../app/routes/component';
|
||||
|
||||
|
||||
//This archive is used to envolve app in contexts, libs, etc..
|
||||
export const Bootstrap = ()=>{
|
||||
return (
|
||||
<>
|
||||
<GestureHandlerRootView>
|
||||
<View>
|
||||
<Text>Bootstrap</Text>
|
||||
</View>
|
||||
<Text>a</Text>
|
||||
<Routes/>
|
||||
</GestureHandlerRootView>
|
||||
</>
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user