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
e9f52db4
Commit
e9f52db4
authored
Dec 22, 2021
by
W.D.R.P. Sandeepa
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'it18218640' into 'master'
add home.js See merge request
!13
parents
6bd2e425
c5dcb363
Changes
6
Hide 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 @
e9f52db4
import
React
from
"
react
"
;
import
React
from
"
react
"
;
import
{
NavigationContainer
}
from
'
@react-navigation/native
'
;
import
{
NavigationContainer
}
from
'
@react-navigation/native
'
;
import
{
createNativeStackNavigator
}
from
'
@react-navigation/native-stack
'
;
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
Register
from
"
../screen/auth/Register
"
;
import
Login
from
"
../screen/auth/Login
"
;
import
Login
from
"
../screen/auth/Login
"
;
import
Splash
from
"
../screen/splash/Splash
"
;
import
Splash
from
"
../screen/splash/Splash
"
;
...
@@ -17,6 +18,7 @@ return(
...
@@ -17,6 +18,7 @@ return(
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Splash
"
component
=
{
Splash
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Splash
"
component
=
{
Splash
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Register
"
component
=
{
Register
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Register
"
component
=
{
Register
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Login
"
component
=
{
Login
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Login
"
component
=
{
Login
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
Start
"
component
=
{
Start
}
/
>
<
/Stack.Navigator
>
<
/Stack.Navigator
>
<
/NavigationContainer
>
<
/NavigationContainer
>
)
)
...
...
frontend/src/screen/Start.js
0 → 100644
View file @
e9f52db4
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 @
e9f52db4
...
@@ -25,7 +25,7 @@ const Login = () => {
...
@@ -25,7 +25,7 @@ const Login = () => {
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
form_input
}
>
<
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
}
>
<
Text
style
=
{
styles
.
btn_text
}
>
Sign
In
Sign
In
<
/Text
>
<
/Text
>
...
...
frontend/src/screen/auth/Register.js
View file @
e9f52db4
...
@@ -34,7 +34,7 @@ const Register = () => {
...
@@ -34,7 +34,7 @@ const Register = () => {
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
form_input
}
>
<
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
}
>
<
Text
style
=
{
styles
.
btn_text
}
>
Sign
Up
Sign
Up
<
/Text
>
<
/Text
>
...
...
frontend/src/screen/home.js
View file @
e9f52db4
import
React
from
"
react
"
;
import
React
from
"
react
"
;
import
{
SafeAreaView
,
ScrollView
,
View
,
Text
}
from
"
react-native
"
;
import
{
StyleSheet
,
View
,
Text
,
Pressable
}
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
"
;
const
Drawer
=
createDrawerNavigator
();
export
default
function
Home
({
navigation
}){
function
Home
()
{
const
onPressHandler
=
()
=>
{
navigation
.
navigate
(
'
Start
'
);
}
return
(
return
(
<
View
>
<
Text
>
Home
<
/Text
>
<
/View
>
)
<
Drawer
.
Navigator
}
initialRouteName
=
"
Profile
"
\ No newline at end of file
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
'
}
/
>
)
}}
/
>
<
/Drawer.Navigator
>
);
}
export
default
Home
;
\ No newline at end of file
frontend/src/screen/profile.js
View file @
e9f52db4
...
@@ -4,7 +4,7 @@ import { StyleSheet, View, Text, Pressable } from 'react-native';
...
@@ -4,7 +4,7 @@ import { StyleSheet, View, Text, Pressable } from 'react-native';
export
default
function
profile
({
navigation
}){
export
default
function
profile
({
navigation
}){
const
onPressHandler
=
()
=>
{
const
onPressHandler
=
()
=>
{
navigation
.
navigate
(
'
home
'
);
navigation
.
navigate
(
'
Start
'
);
}
}
return
(
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