Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2021-090 frontend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2021-090
2021-090 frontend
Commits
770ef71c
Commit
770ef71c
authored
Oct 07, 2021
by
IT18111170-Silva S.H.I
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: navigation drawer
parent
913733db
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
23 deletions
+47
-23
App.js
App.js
+2
-2
Navigations/AuthStack.js
Navigations/AuthStack.js
+42
-19
Navigations/homeStack.js
Navigations/homeStack.js
+3
-2
No files found.
App.js
View file @
770ef71c
...
...
@@ -25,8 +25,8 @@ export default function App() {
<
NavigationContainer
>
<
Drawer
.
Navigator
initialRouteName
=
"
Authntications
"
>
<
Drawer
.
Screen
name
=
"
Authentications
"
component
=
{
AuthStack
}
/
>
{
/* <Drawer.Screen name="Agripreneurs" component={BottomTab} /> */
}
<
Drawer
.
Screen
name
=
"
HOME
"
component
=
{
AuthStack
}
/
>
<
Drawer
.
Screen
name
=
"
About Us
"
component
=
{
homeStack
}
/
>
{
/* <Drawer.Screen name="MainTab" component={MainTabScreen} /> */
}
{
/* <Drawer.Screen name="About Us" component={AboutUs} /> */
}
<
/Drawer.Navigator
>
...
...
Navigations/AuthStack.js
View file @
770ef71c
...
...
@@ -8,6 +8,7 @@ import { HomeScreen } from "../screen/HomeScreen";
import
{
Leaderboard
}
from
"
../screen/Leaderboard
"
;
import
{
PriceScreen
}
from
"
../screen/PriceScreen
"
;
import
{
gamification
}
from
"
../screen/gamification
"
;
import
{
IotScreen
}
from
"
../screen/IotScreen
"
;
import
{
AboutUs
}
from
"
../screen/AboutUs
"
;
import
axios
from
"
axios
"
;
...
...
@@ -20,28 +21,28 @@ export function AuthStack({ navigation }) {
name
=
"
SignIn
"
component
=
{
SignIn
}
options
=
{{
headerLeft
:
()
=>
{
return
(
<
Ionicons
name
=
"
md-menu
"
size
=
{
30
}
color
=
"
black
"
onPress
=
{()
=>
navigation
.
openDrawer
()}
/
>
);
},
//
headerLeft: () => {
//
return (
//
<Ionicons
//
name="md-menu"
//
size={30}
//
color="black"
//
onPress={() => navigation.openDrawer()}
//
/>
//
);
//
},
headerStyle
:
{
backgroundColor
:
'
white
'
,
},
header
LeftContainerStyle
:
{
paddingLeft
:
10
}
,
headerRight
:
()
=>
{
return
(
<
MaterialIcons
name
=
"
logout
"
size
=
{
30
}
color
=
"
black
"
/>
);
},
header
TitleAlign
:
"
center
"
,
//
headerRight: () => {
//
return (
//
<MaterialIcons name="logout"
//
size={30}
//
color="black"
//
/>
//
);
//
},
}}
/
>
<
Stack
.
Screen
...
...
@@ -52,12 +53,34 @@ export function AuthStack({ navigation }) {
headerTitleAlign
:
"
center
"
,
}}
/
>
<
Stack
.
Screen
name
=
"
IotScreen
"
component
=
{
IotScreen
}
options
=
{{
title
:
"
IOT Page
"
,
headerTitleAlign
:
"
center
"
,
}}
/
>
<
Stack
.
Screen
name
=
"
HomeScreen
"
component
=
{
HomeScreen
}
options
=
{{
title
:
"
Agripreneurs
"
,
headerTitleAlign
:
"
center
"
,
headerLeft
:
()
=>
{
return
(
<
Ionicons
name
=
"
md-menu
"
size
=
{
30
}
color
=
"
black
"
onPress
=
{()
=>
navigation
.
openDrawer
()}
/
>
);
},
headerStyle
:
{
backgroundColor
:
'
white
'
,
},
headerLeftContainerStyle
:
{
paddingLeft
:
10
},
headerRight
:
()
=>
{
return
(
<
MaterialIcons
name
=
"
logout
"
...
...
Navigations/homeStack.js
View file @
770ef71c
...
...
@@ -6,6 +6,7 @@ import { HomeScreen } from "../screen/HomeScreen";
import
{
Leaderboard
}
from
"
../screen/Leaderboard
"
;
import
{
PriceScreen
}
from
"
../screen/PriceScreen
"
;
import
{
gamification
}
from
"
../screen/gamification
"
;
import
{
AboutUs
}
from
"
../screen/AboutUs
"
;
const
Stack
=
createStackNavigator
();
...
...
@@ -13,7 +14,7 @@ const Stack = createStackNavigator();
export
function
homeStack
({
navigation
})
{
return
(
<
Stack
.
Navigator
>
<
Stack
.
Screen
{
/*
<Stack.Screen
name="Agripreneurs"
component={HomeScreen}
options={{
...
...
@@ -56,7 +57,7 @@ export function homeStack({ navigation }) {
title: "Gamification Page",
headerTitleAlign: "center",
}}
/
>
/>
*/
}
<
Stack
.
Screen
name
=
"
AboutUs
"
component
=
{
AboutUs
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment