Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
21_22-J 38
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
21_22-J 38
21_22-J 38
Commits
a11b2a90
Commit
a11b2a90
authored
Dec 22, 2021
by
W.D.R.P. Sandeepa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add home.js
parent
2abe6d60
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
94 additions
and
60 deletions
+94
-60
frontend/src/router/router.js
frontend/src/router/router.js
+3
-1
frontend/src/screen/Start.js
frontend/src/screen/Start.js
+78
-0
frontend/src/screen/auth/Login.js
frontend/src/screen/auth/Login.js
+1
-1
frontend/src/screen/auth/Register.js
frontend/src/screen/auth/Register.js
+1
-1
frontend/src/screen/home.js
frontend/src/screen/home.js
+10
-56
frontend/src/screen/profile.js
frontend/src/screen/profile.js
+1
-1
No files found.
frontend/src/router/router.js
View file @
a11b2a90
import
React
from
"
react
"
;
import
{
NavigationContainer
}
from
'
@react-navigation/native
'
;
import
{
createNativeStackNavigator
}
from
'
@react-navigation/native-stack
'
;
import
Home
from
"
../screen/Home
"
;
import
Home
from
"
../screen/Home
"
;
import
Start
from
"
../screen/Start
"
import
Register
from
"
../screen/auth/Register
"
;
import
Login
from
"
../screen/auth/Login
"
;
import
Splash
from
"
../screen/splash/Splash
"
;
...
...
@@ -17,6 +18,7 @@ return(
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Splash
"
component
=
{
Splash
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Register
"
component
=
{
Register
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Login
"
component
=
{
Login
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Start
"
component
=
{
Start
}
/
>
<
/Stack.Navigator
>
<
/NavigationContainer
>
)
...
...
frontend/src/screen/Start.js
0 → 100644
View file @
a11b2a90
import
React
from
"
react
"
;
import
{
SafeAreaView
,
ScrollView
,
View
,
Text
}
from
"
react-native
"
;
import
{
NavigationContainer
}
from
"
@react-navigation/native
"
;
import
{
createDrawerNavigator
,
DrawerItem
}
from
"
@react-navigation/drawer
"
;
import
FontAwesome5
from
'
react-native-vector-icons/FontAwesome5
'
;
import
Home
from
"
./Home
"
;
import
profile
from
"
./profile
"
;
import
report
from
"
./report
"
;
const
Drawer
=
createDrawerNavigator
();
function
Start
()
{
return
(
<
Drawer
.
Navigator
initialRouteName
=
"
Home
"
screenOptions
=
{{
hearderTitleAlign
:
'
right
'
,
alignItems
:
'
center
'
,
justifyContent
:
'
center
'
,
headerStyle
:{
backgroundColor
:
'
#1DCE92
'
},
headerTintColor
:
'
#ffffff
'
}}
>
<
Drawer
.
Screen
name
=
"
Home
"
component
=
{
Home
}
options
=
{{
title
:
'
Home
'
,
drawerIcon
:
({
focused
})
=>
(
<
FontAwesome5
name
=
"
home
"
size
=
{
focused
?
25
:
20
}
color
=
{
focused
?
'
#1DCE92
'
:
'
#0096FF
'
}
/
>
)
}}
/
>
<
Drawer
.
Screen
name
=
"
Profile
"
component
=
{
profile
}
options
=
{{
title
:
'
Profile
'
,
drawerIcon
:
({
focused
})
=>
(
<
FontAwesome5
name
=
"
users
"
size
=
{
focused
?
25
:
20
}
color
=
{
focused
?
'
#1DCE92
'
:
'
#0096FF
'
}
/
>
)
}}
/
>
<
Drawer
.
Screen
name
=
"
Report
"
component
=
{
report
}
options
=
{{
title
:
'
Report
'
,
drawerIcon
:
({
focused
})
=>
(
<
FontAwesome5
name
=
"
chart-line
"
size
=
{
focused
?
25
:
20
}
color
=
{
focused
?
'
#1DCE92
'
:
'
#0096FF
'
}
/
>
)
}}
/
>
<
/Drawer.Navigator
>
);
}
export
default
Start
;
\ No newline at end of file
frontend/src/screen/auth/Login.js
View file @
a11b2a90
...
...
@@ -25,7 +25,7 @@ const Login = () => {
<
/View
>
<
View
style
=
{
styles
.
form_input
}
>
<
TouchableOpacity
onPress
=
{()
=>
{
navigation
.
navigate
(
"
Home
"
)}}
style
=
{
styles
.
btn
}
>
<
TouchableOpacity
onPress
=
{()
=>
{
navigation
.
navigate
(
"
Start
"
)}}
style
=
{
styles
.
btn
}
>
<
Text
style
=
{
styles
.
btn_text
}
>
Sign
In
<
/Text
>
...
...
frontend/src/screen/auth/Register.js
View file @
a11b2a90
...
...
@@ -34,7 +34,7 @@ const Register = () => {
<
/View
>
<
View
style
=
{
styles
.
form_input
}
>
<
TouchableOpacity
onPress
=
{()
=>
{
navigation
.
navigate
(
"
Home
"
)}}
style
=
{
styles
.
btn
}
>
<
TouchableOpacity
onPress
=
{()
=>
{
navigation
.
navigate
(
"
Start
"
)}}
style
=
{
styles
.
btn
}
>
<
Text
style
=
{
styles
.
btn_text
}
>
Sign
Up
<
/Text
>
...
...
frontend/src/screen/home.js
View file @
a11b2a90
import
React
from
"
react
"
;
import
{
SafeAreaView
,
ScrollView
,
View
,
Text
}
from
"
react-native
"
;
import
{
NavigationContainer
}
from
"
@react-navigation/native
"
;
import
{
createDrawerNavigator
,
DrawerItem
}
from
"
@react-navigation/drawer
"
;
import
FontAwesome5
from
'
react-native-vector-icons/FontAwesome5
'
;
import
profile
from
"
./profile
"
;
import
report
from
"
./report
"
;
import
{
StyleSheet
,
View
,
Text
,
Pressable
}
from
'
react-native
'
;
const
Drawer
=
createDrawerNavigator
();
export
default
function
Home
({
navigation
}){
function
Home
()
{
const
onPressHandler
=
()
=>
{
navigation
.
navigate
(
'
Start
'
);
}
return
(
<
Drawer
.
Navigator
initialRouteName
=
"
Profile
"
screenOptions
=
{{
hearderTitleAlign
:
'
right
'
,
alignItems
:
'
center
'
,
justifyContent
:
'
center
'
,
headerStyle
:{
backgroundColor
:
'
#1DCE92
'
},
headerTintColor
:
'
#ffffff
'
}}
>
<
Drawer
.
Screen
name
=
"
Profile
"
component
=
{
profile
}
options
=
{{
title
:
'
Profile
'
,
drawerIcon
:
({
focused
})
=>
(
<
FontAwesome5
name
=
"
users
"
size
=
{
focused
?
25
:
20
}
color
=
{
focused
?
'
#1DCE92
'
:
'
#0096FF
'
}
/
>
)
}}
/
>
<
Drawer
.
Screen
name
=
"
Report
"
component
=
{
report
}
options
=
{{
title
:
'
Report
'
,
drawerIcon
:
({
focused
})
=>
(
<
FontAwesome5
name
=
"
chart-line
"
size
=
{
focused
?
25
:
20
}
color
=
{
focused
?
'
#1DCE92
'
:
'
#0096FF
'
}
/
>
<
View
>
<
Text
>
Home
<
/Text
>
<
/View
>
)
}}
/
>
<
/Drawer.Navigator
>
);
}
export
default
Home
;
\ No newline at end of file
}
\ No newline at end of file
frontend/src/screen/profile.js
View file @
a11b2a90
...
...
@@ -4,7 +4,7 @@ import { StyleSheet, View, Text, Pressable } from 'react-native';
export
default
function
profile
({
navigation
}){
const
onPressHandler
=
()
=>
{
navigation
.
navigate
(
'
home
'
);
navigation
.
navigate
(
'
Start
'
);
}
return
(
...
...
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